From 3561623eb4fa30042c7608cf6e1f9a8a84933249 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 12 Jul 2023 19:05:15 -0700 Subject: [PATCH] chore: delete unused code (#402) --- .eslintignore | 7 - .eslintrc.json | 3 - .github/.OwlBot.lock.yaml | 16 - .github/.OwlBot.yaml | 26 - .github/CODEOWNERS | 12 - .github/ISSUE_TEMPLATE/bug_report.md | 38 - .github/ISSUE_TEMPLATE/config.yml | 4 - .github/ISSUE_TEMPLATE/feature_request.md | 18 - .github/ISSUE_TEMPLATE/question.md | 12 - .github/ISSUE_TEMPLATE/support_request.md | 7 - .github/PULL_REQUEST_TEMPLATE.md | 7 - .github/auto-approve.yml | 3 - .github/auto-label.yaml | 2 - .github/generated-files-bot.yml | 16 - .github/release-please.yml | 2 - .github/release-trigger.yml | 1 - .github/sync-repo-settings.yaml | 24 - .github/workflows/ci.yaml | 60 - .jsdoc.js | 55 - .kokoro/.gitattributes | 1 - .kokoro/common.cfg | 24 - .kokoro/continuous/node12/common.cfg | 24 - .kokoro/continuous/node12/lint.cfg | 4 - .kokoro/continuous/node12/samples-test.cfg | 7 - .kokoro/continuous/node12/system-test.cfg | 7 - .kokoro/continuous/node12/test.cfg | 0 .kokoro/continuous/node6/common.cfg | 24 - .kokoro/continuous/node6/test.cfg | 0 .kokoro/docs.sh | 25 - .kokoro/lint.sh | 33 - .kokoro/populate-secrets.sh | 76 - .kokoro/presubmit/node12/common.cfg | 24 - .kokoro/presubmit/node12/samples-test.cfg | 7 - .kokoro/presubmit/node12/system-test.cfg | 7 - .kokoro/presubmit/node12/test.cfg | 0 .kokoro/presubmit/node6/common.cfg | 24 - .kokoro/presubmit/node6/test.cfg | 0 .kokoro/presubmit/windows/common.cfg | 2 - .kokoro/presubmit/windows/test.cfg | 2 - .kokoro/publish.sh | 30 - .kokoro/release/docs-devsite.cfg | 26 - .kokoro/release/docs-devsite.sh | 29 - .kokoro/release/docs.cfg | 26 - .kokoro/release/docs.sh | 49 - .kokoro/release/publish.cfg | 39 - .kokoro/samples-test.sh | 68 - .kokoro/system-test.sh | 61 - .kokoro/test.bat | 33 - .kokoro/test.sh | 51 - .kokoro/trampoline.sh | 32 - .kokoro/trampoline_v2.sh | 490 - .mocharc.js | 29 - .nycrc | 24 - .prettierignore | 6 - .prettierrc.js | 17 - .repo-metadata.json | 16 - .trampolinerc | 52 - CHANGELOG.md | 345 - CODE_OF_CONDUCT.md | 123 +- CONTRIBUTING.md | 21 - linkinator.config.json | 10 - owlbot.py | 17 - package.json | 67 - prettier.config.js | 4 - protos/google/cloud/common_resources.proto | 52 - .../cloud/datacatalog/v1/bigquery.proto | 82 - .../google/cloud/datacatalog/v1/common.proto | 54 - .../cloud/datacatalog/v1/data_source.proto | 87 - .../cloud/datacatalog/v1/datacatalog.proto | 1710 - .../cloud/datacatalog/v1/dataplex_spec.proto | 90 - .../datacatalog/v1/gcs_fileset_spec.proto | 78 - .../datacatalog/v1/physical_schema.proto | 83 - .../datacatalog/v1/policytagmanager.proto | 481 - .../v1/policytagmanagerserialization.proto | 222 - .../google/cloud/datacatalog/v1/schema.proto | 67 - .../google/cloud/datacatalog/v1/search.proto | 119 - .../cloud/datacatalog/v1/table_spec.proto | 114 - protos/google/cloud/datacatalog/v1/tags.proto | 279 - .../cloud/datacatalog/v1/timestamps.proto | 48 - .../google/cloud/datacatalog/v1/usage.proto | 66 - .../cloud/datacatalog/v1beta1/common.proto | 38 - .../datacatalog/v1beta1/datacatalog.proto | 1186 - .../v1beta1/gcs_fileset_spec.proto | 77 - .../v1beta1/policytagmanager.proto | 417 - .../policytagmanagerserialization.proto | 157 - .../cloud/datacatalog/v1beta1/schema.proto | 55 - .../cloud/datacatalog/v1beta1/search.proto | 70 - .../datacatalog/v1beta1/table_spec.proto | 101 - .../cloud/datacatalog/v1beta1/tags.proto | 229 - .../datacatalog/v1beta1/timestamps.proto | 41 - protos/protos.d.ts | 27008 ------- protos/protos.js | 64724 ---------------- protos/protos.json | 7163 -- renovate.json | 20 - samples/.eslintrc.yml | 5 - samples/README.md | 122 - samples/createCustomEntry.js | 192 - samples/createFileset.js | 142 - .../generated/v1/data_catalog.create_entry.js | 76 - .../v1/data_catalog.create_entry_group.js | 75 - .../generated/v1/data_catalog.create_tag.js | 70 - .../v1/data_catalog.create_tag_template.js | 75 - .../data_catalog.create_tag_template_field.js | 77 - .../generated/v1/data_catalog.delete_entry.js | 61 - .../v1/data_catalog.delete_entry_group.js | 65 - .../generated/v1/data_catalog.delete_tag.js | 61 - .../v1/data_catalog.delete_tag_template.js | 67 - .../data_catalog.delete_tag_template_field.js | 67 - .../generated/v1/data_catalog.get_entry.js | 61 - .../v1/data_catalog.get_entry_group.js | 65 - .../v1/data_catalog.get_iam_policy.js | 67 - .../v1/data_catalog.get_tag_template.js | 61 - .../generated/v1/data_catalog.list_entries.js | 81 - .../v1/data_catalog.list_entry_groups.js | 75 - .../generated/v1/data_catalog.list_tags.js | 75 - .../generated/v1/data_catalog.lookup_entry.js | 89 - .../v1/data_catalog.modify_entry_contacts.js | 66 - .../v1/data_catalog.modify_entry_overview.js | 66 - .../data_catalog.rename_tag_template_field.js | 66 - ...og.rename_tag_template_field_enum_value.js | 66 - .../v1/data_catalog.search_catalog.js | 104 - .../v1/data_catalog.set_iam_policy.js | 77 - .../generated/v1/data_catalog.star_entry.js | 61 - .../v1/data_catalog.test_iam_permissions.js | 70 - .../generated/v1/data_catalog.unstar_entry.js | 61 - .../generated/v1/data_catalog.update_entry.js | 85 - .../v1/data_catalog.update_entry_group.js | 68 - .../generated/v1/data_catalog.update_tag.js | 69 - .../v1/data_catalog.update_tag_template.js | 71 - .../data_catalog.update_tag_template_field.js | 82 - .../policy_tag_manager.create_policy_tag.js | 65 - .../v1/policy_tag_manager.create_taxonomy.js | 65 - .../policy_tag_manager.delete_policy_tag.js | 62 - .../v1/policy_tag_manager.delete_taxonomy.js | 62 - .../v1/policy_tag_manager.get_iam_policy.js | 67 - .../v1/policy_tag_manager.get_policy_tag.js | 61 - .../v1/policy_tag_manager.get_taxonomy.js | 61 - .../v1/policy_tag_manager.list_policy_tags.js | 75 - .../v1/policy_tag_manager.list_taxonomies.js | 74 - .../v1/policy_tag_manager.set_iam_policy.js | 77 - ...policy_tag_manager.test_iam_permissions.js | 70 - .../policy_tag_manager.update_policy_tag.js | 69 - .../v1/policy_tag_manager.update_taxonomy.js | 68 - ...manager_serialization.export_taxonomies.js | 71 - ...manager_serialization.import_taxonomies.js | 69 - ..._manager_serialization.replace_taxonomy.js | 66 - ..._metadata.google.cloud.datacatalog.v1.json | 2163 - .../v1beta1/data_catalog.create_entry.js | 74 - .../data_catalog.create_entry_group.js | 75 - .../v1beta1/data_catalog.create_tag.js | 70 - .../data_catalog.create_tag_template.js | 74 - .../data_catalog.create_tag_template_field.js | 78 - .../v1beta1/data_catalog.delete_entry.js | 62 - .../data_catalog.delete_entry_group.js | 66 - .../v1beta1/data_catalog.delete_tag.js | 62 - .../data_catalog.delete_tag_template.js | 69 - .../data_catalog.delete_tag_template_field.js | 69 - .../v1beta1/data_catalog.get_entry.js | 62 - .../v1beta1/data_catalog.get_entry_group.js | 66 - .../v1beta1/data_catalog.get_iam_policy.js | 67 - .../v1beta1/data_catalog.get_tag_template.js | 62 - .../v1beta1/data_catalog.list_entries.js | 82 - .../v1beta1/data_catalog.list_entry_groups.js | 75 - .../v1beta1/data_catalog.list_tags.js | 77 - .../v1beta1/data_catalog.lookup_entry.js | 78 - .../data_catalog.rename_tag_template_field.js | 67 - .../v1beta1/data_catalog.search_catalog.js | 102 - .../v1beta1/data_catalog.set_iam_policy.js | 77 - .../data_catalog.test_iam_permissions.js | 70 - .../v1beta1/data_catalog.update_entry.js | 83 - .../data_catalog.update_entry_group.js | 66 - .../v1beta1/data_catalog.update_tag.js | 66 - .../data_catalog.update_tag_template.js | 68 - .../data_catalog.update_tag_template_field.js | 81 - .../policy_tag_manager.create_policy_tag.js | 65 - .../policy_tag_manager.create_taxonomy.js | 65 - .../policy_tag_manager.delete_policy_tag.js | 62 - .../policy_tag_manager.delete_taxonomy.js | 62 - .../policy_tag_manager.get_iam_policy.js | 67 - .../policy_tag_manager.get_policy_tag.js | 61 - .../policy_tag_manager.get_taxonomy.js | 61 - .../policy_tag_manager.list_policy_tags.js | 73 - .../policy_tag_manager.list_taxonomies.js | 73 - .../policy_tag_manager.set_iam_policy.js | 77 - ...policy_tag_manager.test_iam_permissions.js | 70 - .../policy_tag_manager.update_policy_tag.js | 71 - .../policy_tag_manager.update_taxonomy.js | 68 - ...manager_serialization.export_taxonomies.js | 71 - ...manager_serialization.import_taxonomies.js | 66 - ...data.google.cloud.datacatalog.v1beta1.json | 1899 - samples/grantTagTemplateUserRole.js | 69 - samples/package.json | 27 - samples/policyTagManager/createPolicyTag.js | 55 - samples/policyTagManager/createTaxonomy.js | 56 - samples/policyTagManager/deleteTaxonomy.js | 47 - samples/policyTagManager/getTaxonomy.js | 47 - samples/policyTagManager/listTaxonomies.js | 53 - samples/quickstart.js | 170 - samples/searchAssets.js | 57 - samples/test/.eslintrc.yml | 3 - samples/test/quickstart.test.js | 88 - samples/test/samples.test.js | 230 - src/index.ts | 46 - src/v1/data_catalog_client.ts | 4859 -- src/v1/data_catalog_client_config.json | 189 - src/v1/data_catalog_proto_list.json | 17 - src/v1/gapic_metadata.json | 555 - src/v1/index.ts | 21 - src/v1/policy_tag_manager_client.ts | 2334 - src/v1/policy_tag_manager_client_config.json | 91 - src/v1/policy_tag_manager_proto_list.json | 17 - ...policy_tag_manager_serialization_client.ts | 1180 - ...g_manager_serialization_client_config.json | 41 - ..._tag_manager_serialization_proto_list.json | 17 - src/v1beta1/data_catalog_client.ts | 4275 - src/v1beta1/data_catalog_client_config.json | 161 - src/v1beta1/data_catalog_proto_list.json | 12 - src/v1beta1/gapic_metadata.json | 495 - src/v1beta1/index.ts | 21 - src/v1beta1/policy_tag_manager_client.ts | 2346 - .../policy_tag_manager_client_config.json | 78 - .../policy_tag_manager_proto_list.json | 12 - ...policy_tag_manager_serialization_client.ts | 1078 - ...g_manager_serialization_client_config.json | 34 - ..._tag_manager_serialization_proto_list.json | 12 - system-test/fixtures/sample/src/index.js | 29 - system-test/fixtures/sample/src/index.ts | 53 - system-test/install.ts | 51 - test/gapic_data_catalog_v1.ts | 5746 -- test/gapic_data_catalog_v1beta1.ts | 5031 -- ...pic_policy_tag_manager_serialization_v1.ts | 1243 - ...olicy_tag_manager_serialization_v1beta1.ts | 1101 - test/gapic_policy_tag_manager_v1.ts | 2919 - test/gapic_policy_tag_manager_v1beta1.ts | 2927 - tsconfig.json | 19 - webpack.config.js | 64 - 236 files changed, 36 insertions(+), 155972 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.json delete mode 100644 .github/.OwlBot.lock.yaml delete mode 100644 .github/.OwlBot.yaml delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/ISSUE_TEMPLATE/question.md delete mode 100644 .github/ISSUE_TEMPLATE/support_request.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/auto-approve.yml delete mode 100644 .github/auto-label.yaml delete mode 100644 .github/generated-files-bot.yml delete mode 100644 .github/release-please.yml delete mode 100644 .github/release-trigger.yml delete mode 100644 .github/sync-repo-settings.yaml delete mode 100644 .github/workflows/ci.yaml delete mode 100644 .jsdoc.js delete mode 100644 .kokoro/.gitattributes delete mode 100644 .kokoro/common.cfg delete mode 100644 .kokoro/continuous/node12/common.cfg delete mode 100644 .kokoro/continuous/node12/lint.cfg delete mode 100644 .kokoro/continuous/node12/samples-test.cfg delete mode 100644 .kokoro/continuous/node12/system-test.cfg delete mode 100644 .kokoro/continuous/node12/test.cfg delete mode 100644 .kokoro/continuous/node6/common.cfg delete mode 100644 .kokoro/continuous/node6/test.cfg delete mode 100755 .kokoro/docs.sh delete mode 100755 .kokoro/lint.sh delete mode 100755 .kokoro/populate-secrets.sh delete mode 100644 .kokoro/presubmit/node12/common.cfg delete mode 100644 .kokoro/presubmit/node12/samples-test.cfg delete mode 100644 .kokoro/presubmit/node12/system-test.cfg delete mode 100644 .kokoro/presubmit/node12/test.cfg delete mode 100644 .kokoro/presubmit/node6/common.cfg delete mode 100644 .kokoro/presubmit/node6/test.cfg delete mode 100644 .kokoro/presubmit/windows/common.cfg delete mode 100644 .kokoro/presubmit/windows/test.cfg delete mode 100755 .kokoro/publish.sh delete mode 100644 .kokoro/release/docs-devsite.cfg delete mode 100755 .kokoro/release/docs-devsite.sh delete mode 100644 .kokoro/release/docs.cfg delete mode 100755 .kokoro/release/docs.sh delete mode 100644 .kokoro/release/publish.cfg delete mode 100755 .kokoro/samples-test.sh delete mode 100755 .kokoro/system-test.sh delete mode 100644 .kokoro/test.bat delete mode 100755 .kokoro/test.sh delete mode 100755 .kokoro/trampoline.sh delete mode 100755 .kokoro/trampoline_v2.sh delete mode 100644 .mocharc.js delete mode 100644 .nycrc delete mode 100644 .prettierignore delete mode 100644 .prettierrc.js delete mode 100644 .repo-metadata.json delete mode 100644 .trampolinerc delete mode 100644 CHANGELOG.md delete mode 100644 linkinator.config.json delete mode 100644 owlbot.py delete mode 100644 package.json delete mode 100644 prettier.config.js delete mode 100644 protos/google/cloud/common_resources.proto delete mode 100644 protos/google/cloud/datacatalog/v1/bigquery.proto delete mode 100644 protos/google/cloud/datacatalog/v1/common.proto delete mode 100644 protos/google/cloud/datacatalog/v1/data_source.proto delete mode 100644 protos/google/cloud/datacatalog/v1/datacatalog.proto delete mode 100644 protos/google/cloud/datacatalog/v1/dataplex_spec.proto delete mode 100644 protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto delete mode 100644 protos/google/cloud/datacatalog/v1/physical_schema.proto delete mode 100644 protos/google/cloud/datacatalog/v1/policytagmanager.proto delete mode 100644 protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto delete mode 100644 protos/google/cloud/datacatalog/v1/schema.proto delete mode 100644 protos/google/cloud/datacatalog/v1/search.proto delete mode 100644 protos/google/cloud/datacatalog/v1/table_spec.proto delete mode 100644 protos/google/cloud/datacatalog/v1/tags.proto delete mode 100644 protos/google/cloud/datacatalog/v1/timestamps.proto delete mode 100644 protos/google/cloud/datacatalog/v1/usage.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/common.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/datacatalog.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/schema.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/search.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/table_spec.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/tags.proto delete mode 100644 protos/google/cloud/datacatalog/v1beta1/timestamps.proto delete mode 100644 protos/protos.d.ts delete mode 100644 protos/protos.js delete mode 100644 protos/protos.json delete mode 100644 renovate.json delete mode 100644 samples/.eslintrc.yml delete mode 100644 samples/README.md delete mode 100644 samples/createCustomEntry.js delete mode 100644 samples/createFileset.js delete mode 100644 samples/generated/v1/data_catalog.create_entry.js delete mode 100644 samples/generated/v1/data_catalog.create_entry_group.js delete mode 100644 samples/generated/v1/data_catalog.create_tag.js delete mode 100644 samples/generated/v1/data_catalog.create_tag_template.js delete mode 100644 samples/generated/v1/data_catalog.create_tag_template_field.js delete mode 100644 samples/generated/v1/data_catalog.delete_entry.js delete mode 100644 samples/generated/v1/data_catalog.delete_entry_group.js delete mode 100644 samples/generated/v1/data_catalog.delete_tag.js delete mode 100644 samples/generated/v1/data_catalog.delete_tag_template.js delete mode 100644 samples/generated/v1/data_catalog.delete_tag_template_field.js delete mode 100644 samples/generated/v1/data_catalog.get_entry.js delete mode 100644 samples/generated/v1/data_catalog.get_entry_group.js delete mode 100644 samples/generated/v1/data_catalog.get_iam_policy.js delete mode 100644 samples/generated/v1/data_catalog.get_tag_template.js delete mode 100644 samples/generated/v1/data_catalog.list_entries.js delete mode 100644 samples/generated/v1/data_catalog.list_entry_groups.js delete mode 100644 samples/generated/v1/data_catalog.list_tags.js delete mode 100644 samples/generated/v1/data_catalog.lookup_entry.js delete mode 100644 samples/generated/v1/data_catalog.modify_entry_contacts.js delete mode 100644 samples/generated/v1/data_catalog.modify_entry_overview.js delete mode 100644 samples/generated/v1/data_catalog.rename_tag_template_field.js delete mode 100644 samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js delete mode 100644 samples/generated/v1/data_catalog.search_catalog.js delete mode 100644 samples/generated/v1/data_catalog.set_iam_policy.js delete mode 100644 samples/generated/v1/data_catalog.star_entry.js delete mode 100644 samples/generated/v1/data_catalog.test_iam_permissions.js delete mode 100644 samples/generated/v1/data_catalog.unstar_entry.js delete mode 100644 samples/generated/v1/data_catalog.update_entry.js delete mode 100644 samples/generated/v1/data_catalog.update_entry_group.js delete mode 100644 samples/generated/v1/data_catalog.update_tag.js delete mode 100644 samples/generated/v1/data_catalog.update_tag_template.js delete mode 100644 samples/generated/v1/data_catalog.update_tag_template_field.js delete mode 100644 samples/generated/v1/policy_tag_manager.create_policy_tag.js delete mode 100644 samples/generated/v1/policy_tag_manager.create_taxonomy.js delete mode 100644 samples/generated/v1/policy_tag_manager.delete_policy_tag.js delete mode 100644 samples/generated/v1/policy_tag_manager.delete_taxonomy.js delete mode 100644 samples/generated/v1/policy_tag_manager.get_iam_policy.js delete mode 100644 samples/generated/v1/policy_tag_manager.get_policy_tag.js delete mode 100644 samples/generated/v1/policy_tag_manager.get_taxonomy.js delete mode 100644 samples/generated/v1/policy_tag_manager.list_policy_tags.js delete mode 100644 samples/generated/v1/policy_tag_manager.list_taxonomies.js delete mode 100644 samples/generated/v1/policy_tag_manager.set_iam_policy.js delete mode 100644 samples/generated/v1/policy_tag_manager.test_iam_permissions.js delete mode 100644 samples/generated/v1/policy_tag_manager.update_policy_tag.js delete mode 100644 samples/generated/v1/policy_tag_manager.update_taxonomy.js delete mode 100644 samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js delete mode 100644 samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js delete mode 100644 samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js delete mode 100644 samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json delete mode 100644 samples/generated/v1beta1/data_catalog.create_entry.js delete mode 100644 samples/generated/v1beta1/data_catalog.create_entry_group.js delete mode 100644 samples/generated/v1beta1/data_catalog.create_tag.js delete mode 100644 samples/generated/v1beta1/data_catalog.create_tag_template.js delete mode 100644 samples/generated/v1beta1/data_catalog.create_tag_template_field.js delete mode 100644 samples/generated/v1beta1/data_catalog.delete_entry.js delete mode 100644 samples/generated/v1beta1/data_catalog.delete_entry_group.js delete mode 100644 samples/generated/v1beta1/data_catalog.delete_tag.js delete mode 100644 samples/generated/v1beta1/data_catalog.delete_tag_template.js delete mode 100644 samples/generated/v1beta1/data_catalog.delete_tag_template_field.js delete mode 100644 samples/generated/v1beta1/data_catalog.get_entry.js delete mode 100644 samples/generated/v1beta1/data_catalog.get_entry_group.js delete mode 100644 samples/generated/v1beta1/data_catalog.get_iam_policy.js delete mode 100644 samples/generated/v1beta1/data_catalog.get_tag_template.js delete mode 100644 samples/generated/v1beta1/data_catalog.list_entries.js delete mode 100644 samples/generated/v1beta1/data_catalog.list_entry_groups.js delete mode 100644 samples/generated/v1beta1/data_catalog.list_tags.js delete mode 100644 samples/generated/v1beta1/data_catalog.lookup_entry.js delete mode 100644 samples/generated/v1beta1/data_catalog.rename_tag_template_field.js delete mode 100644 samples/generated/v1beta1/data_catalog.search_catalog.js delete mode 100644 samples/generated/v1beta1/data_catalog.set_iam_policy.js delete mode 100644 samples/generated/v1beta1/data_catalog.test_iam_permissions.js delete mode 100644 samples/generated/v1beta1/data_catalog.update_entry.js delete mode 100644 samples/generated/v1beta1/data_catalog.update_entry_group.js delete mode 100644 samples/generated/v1beta1/data_catalog.update_tag.js delete mode 100644 samples/generated/v1beta1/data_catalog.update_tag_template.js delete mode 100644 samples/generated/v1beta1/data_catalog.update_tag_template_field.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js delete mode 100644 samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js delete mode 100644 samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json delete mode 100644 samples/grantTagTemplateUserRole.js delete mode 100644 samples/package.json delete mode 100644 samples/policyTagManager/createPolicyTag.js delete mode 100644 samples/policyTagManager/createTaxonomy.js delete mode 100644 samples/policyTagManager/deleteTaxonomy.js delete mode 100644 samples/policyTagManager/getTaxonomy.js delete mode 100644 samples/policyTagManager/listTaxonomies.js delete mode 100644 samples/quickstart.js delete mode 100644 samples/searchAssets.js delete mode 100644 samples/test/.eslintrc.yml delete mode 100644 samples/test/quickstart.test.js delete mode 100644 samples/test/samples.test.js delete mode 100644 src/index.ts delete mode 100644 src/v1/data_catalog_client.ts delete mode 100644 src/v1/data_catalog_client_config.json delete mode 100644 src/v1/data_catalog_proto_list.json delete mode 100644 src/v1/gapic_metadata.json delete mode 100644 src/v1/index.ts delete mode 100644 src/v1/policy_tag_manager_client.ts delete mode 100644 src/v1/policy_tag_manager_client_config.json delete mode 100644 src/v1/policy_tag_manager_proto_list.json delete mode 100644 src/v1/policy_tag_manager_serialization_client.ts delete mode 100644 src/v1/policy_tag_manager_serialization_client_config.json delete mode 100644 src/v1/policy_tag_manager_serialization_proto_list.json delete mode 100644 src/v1beta1/data_catalog_client.ts delete mode 100644 src/v1beta1/data_catalog_client_config.json delete mode 100644 src/v1beta1/data_catalog_proto_list.json delete mode 100644 src/v1beta1/gapic_metadata.json delete mode 100644 src/v1beta1/index.ts delete mode 100644 src/v1beta1/policy_tag_manager_client.ts delete mode 100644 src/v1beta1/policy_tag_manager_client_config.json delete mode 100644 src/v1beta1/policy_tag_manager_proto_list.json delete mode 100644 src/v1beta1/policy_tag_manager_serialization_client.ts delete mode 100644 src/v1beta1/policy_tag_manager_serialization_client_config.json delete mode 100644 src/v1beta1/policy_tag_manager_serialization_proto_list.json delete mode 100644 system-test/fixtures/sample/src/index.js delete mode 100644 system-test/fixtures/sample/src/index.ts delete mode 100644 system-test/install.ts delete mode 100644 test/gapic_data_catalog_v1.ts delete mode 100644 test/gapic_data_catalog_v1beta1.ts delete mode 100644 test/gapic_policy_tag_manager_serialization_v1.ts delete mode 100644 test/gapic_policy_tag_manager_serialization_v1beta1.ts delete mode 100644 test/gapic_policy_tag_manager_v1.ts delete mode 100644 test/gapic_policy_tag_manager_v1beta1.ts delete mode 100644 tsconfig.json delete mode 100644 webpack.config.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index ea5b04ae..00000000 --- a/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/coverage -test/fixtures -build/ -docs/ -protos/ -samples/generated/ diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 78215349..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml deleted file mode 100644 index 0c6d0002..00000000 --- a/.github/.OwlBot.lock.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.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. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml deleted file mode 100644 index 31345193..00000000 --- a/.github/.OwlBot.yaml +++ /dev/null @@ -1,26 +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 -# -# 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. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - - -deep-remove-regex: - - /owl-bot-staging - -deep-copy-regex: - - source: /google/cloud/datacatalog/(v.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 - -begin-after-commit-hash: eebcfa346c9963da765cd71722c40e04dc3621dd - diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 80520bba..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,12 +0,0 @@ -# Code owners file. -# This file controls who is tagged for review for any given pull request. -# -# For syntax help see: -# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax - - -# The yoshi-nodejs team is the default owner for nodejs repositories. -* @googleapis/yoshi-nodejs - -# The github automation team is the default owner for the auto-approve file. -.github/auto-approve.yml @googleapis/github-automation diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c757e63a..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -labels: 'type: bug, priority: p2' ---- - -Thanks for stopping by to let us know something could be better! - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. - -1) Is this a client library issue or a product issue? -This is the client library for . We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the [ Support page]() to reach the most relevant engineers. - -2) Did someone already solve this? - - Search the issues already opened: https://github.com/googleapis/nodejs-datacatalog/issues - - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node - - Search or ask on StackOverflow (engineers monitor these tags): http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js - -3) Do you have a support contract? -Please create an issue in the [support console](https://cloud.google.com/support/) to ensure a timely response. - -If the support paths suggested above still do not result in a resolution, please provide the following details. - -#### Environment details - - - OS: - - Node.js version: - - npm version: - - `@google-cloud/datacatalog` version: - -#### Steps to reproduce - - 1. ? - 2. ? - -Making sure to follow these steps will guarantee the quickest resolution possible. - -Thanks! diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 603b9013..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -contact_links: - - name: Google Cloud Support - url: https://cloud.google.com/support/ - about: If you have a support contract with Google, please use the Google Cloud Support portal. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index b0327dfa..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this library -labels: 'type: feature request, priority: p3' ---- - -Thanks for stopping by to let us know something could be better! - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. - - **Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - **Describe the solution you'd like** -A clear and concise description of what you want to happen. - **Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - **Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 97323113..00000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Question -about: Ask a question -labels: 'type: question, priority: p3' ---- - -Thanks for stopping by to ask us a question! Please make sure to include: -- What you're trying to do -- What code you've already tried -- Any error messages you're getting - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md deleted file mode 100644 index 99586903..00000000 --- a/.github/ISSUE_TEMPLATE/support_request.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: Support request -about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. - ---- - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index e8b4a2b4..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ -Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: -- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-datacatalog/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea -- [ ] Ensure the tests and linter pass -- [ ] Code coverage does not decrease (if any source code was changed) -- [ ] Appropriate docs were updated (if necessary) - -Fixes # 🦕 diff --git a/.github/auto-approve.yml b/.github/auto-approve.yml deleted file mode 100644 index 4cd91cc1..00000000 --- a/.github/auto-approve.yml +++ /dev/null @@ -1,3 +0,0 @@ -processes: - - "NodeDependency" - - "OwlBotTemplateChanges" diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml deleted file mode 100644 index 09c8d735..00000000 --- a/.github/auto-label.yaml +++ /dev/null @@ -1,2 +0,0 @@ -requestsize: - enabled: true diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml deleted file mode 100644 index 992ccef4..00000000 --- a/.github/generated-files-bot.yml +++ /dev/null @@ -1,16 +0,0 @@ -generatedFiles: -- path: '.kokoro/**' - message: '`.kokoro` files are templated and should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' -- path: '.github/CODEOWNERS' - message: 'CODEOWNERS should instead be modified via the `codeowner_team` property in .repo-metadata.json' -- path: '.github/workflows/ci.yaml' - message: '`.github/workflows/ci.yaml` (GitHub Actions) should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' -- path: '.github/generated-files-bot.+(yml|yaml)' - message: '`.github/generated-files-bot.(yml|yaml)` should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' -- path: 'README.md' - message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/main/.readme-partials.yaml' -- path: 'samples/README.md' - message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/main/.readme-partials.yaml' -ignoreAuthors: -- 'gcf-owl-bot[bot]' -- 'yoshi-automation' diff --git a/.github/release-please.yml b/.github/release-please.yml deleted file mode 100644 index a1b41da3..00000000 --- a/.github/release-please.yml +++ /dev/null @@ -1,2 +0,0 @@ -handleGHRelease: true -releaseType: node diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml deleted file mode 100644 index d4ca9418..00000000 --- a/.github/release-trigger.yml +++ /dev/null @@ -1 +0,0 @@ -enabled: true diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml deleted file mode 100644 index 4a30a08e..00000000 --- a/.github/sync-repo-settings.yaml +++ /dev/null @@ -1,24 +0,0 @@ -branchProtectionRules: - - pattern: main - isAdminEnforced: true - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: true - requiredStatusCheckContexts: - - "ci/kokoro: Samples test" - - "ci/kokoro: System test" - - docs - - lint - - test (12) - - test (14) - - test (16) - - cla/google - - windows - - OwlBot Post Processor -permissionRules: - - team: yoshi-admins - permission: admin - - team: jsteam-admins - permission: admin - - team: jsteam - permission: push diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index f447b84a..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,60 +0,0 @@ -on: - push: - branches: - - main - pull_request: -name: ci -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - node: [12, 14, 16] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - - run: node --version - # The first installation step ensures that all of our production - # dependencies work on the given Node.js version, this helps us find - # dependencies that don't match our engines field: - - run: npm install --production --engine-strict --ignore-scripts --no-package-lock - # Clean up the production install, before installing dev/production: - - run: rm -rf node_modules - - run: npm install - - run: npm test - env: - MOCHA_THROW_DEPRECATION: false - windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 14 - - run: npm install - - run: npm test - env: - MOCHA_THROW_DEPRECATION: false - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 14 - - run: npm install - - run: npm run lint - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 14 - - run: npm install - - run: npm run docs - - uses: JustinBeckwith/linkinator-action@v1 - with: - paths: docs/ diff --git a/.jsdoc.js b/.jsdoc.js deleted file mode 100644 index 72a81217..00000000 --- a/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file 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 2022 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/datacatalog', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/.kokoro/.gitattributes b/.kokoro/.gitattributes deleted file mode 100644 index 87acd4f4..00000000 --- a/.kokoro/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* linguist-generated=true diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg deleted file mode 100644 index dbc82f69..00000000 --- a/.kokoro/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-datacatalog/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/test.sh" -} diff --git a/.kokoro/continuous/node12/common.cfg b/.kokoro/continuous/node12/common.cfg deleted file mode 100644 index dbc82f69..00000000 --- a/.kokoro/continuous/node12/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-datacatalog/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/test.sh" -} diff --git a/.kokoro/continuous/node12/lint.cfg b/.kokoro/continuous/node12/lint.cfg deleted file mode 100644 index 5417eaef..00000000 --- a/.kokoro/continuous/node12/lint.cfg +++ /dev/null @@ -1,4 +0,0 @@ -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/lint.sh" -} diff --git a/.kokoro/continuous/node12/samples-test.cfg b/.kokoro/continuous/node12/samples-test.cfg deleted file mode 100644 index 9cdb7ae8..00000000 --- a/.kokoro/continuous/node12/samples-test.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/samples-test.sh" -} diff --git a/.kokoro/continuous/node12/system-test.cfg b/.kokoro/continuous/node12/system-test.cfg deleted file mode 100644 index ccd29b83..00000000 --- a/.kokoro/continuous/node12/system-test.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/system-test.sh" -} diff --git a/.kokoro/continuous/node12/test.cfg b/.kokoro/continuous/node12/test.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/.kokoro/continuous/node6/common.cfg b/.kokoro/continuous/node6/common.cfg deleted file mode 100644 index 3d2fe7fb..00000000 --- a/.kokoro/continuous/node6/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "google-cloud-node/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-cloud-node/.kokoro/test.sh" -} diff --git a/.kokoro/continuous/node6/test.cfg b/.kokoro/continuous/node6/test.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/.kokoro/docs.sh b/.kokoro/docs.sh deleted file mode 100755 index 85901242..00000000 --- a/.kokoro/docs.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -export NPM_CONFIG_PREFIX=${HOME}/.npm-global - -cd $(dirname $0)/.. - -npm install - -npm run docs-test diff --git a/.kokoro/lint.sh b/.kokoro/lint.sh deleted file mode 100755 index aef4866e..00000000 --- a/.kokoro/lint.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -export NPM_CONFIG_PREFIX=${HOME}/.npm-global - -cd $(dirname $0)/.. - -npm install - -# Install and link samples -if [ -f samples/package.json ]; then - cd samples/ - npm link ../ - npm install - cd .. -fi - -npm run lint diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh deleted file mode 100755 index deb2b199..00000000 --- a/.kokoro/populate-secrets.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC. -# -# Licensed under the Apache License, Version 2.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. - -# This file is called in the early stage of `trampoline_v2.sh` to -# populate secrets needed for the CI builds. - -set -eo pipefail - -function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} -function msg { println "$*" >&2 ;} -function println { printf '%s\n' "$(now) $*" ;} - -# Populates requested secrets set in SECRET_MANAGER_KEYS - -# In Kokoro CI builds, we use the service account attached to the -# Kokoro VM. This means we need to setup auth on other CI systems. -# For local run, we just use the gcloud command for retrieving the -# secrets. - -if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then - GCLOUD_COMMANDS=( - "docker" - "run" - "--entrypoint=gcloud" - "--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR}" - "gcr.io/google.com/cloudsdktool/cloud-sdk" - ) - if [[ "${TRAMPOLINE_CI:-}" == "kokoro" ]]; then - SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" - else - echo "Authentication for this CI system is not implemented yet." - exit 2 - # TODO: Determine appropriate SECRET_LOCATION and the GCLOUD_COMMANDS. - fi -else - # For local run, use /dev/shm or temporary directory for - # KOKORO_GFILE_DIR. - if [[ -d "/dev/shm" ]]; then - export KOKORO_GFILE_DIR=/dev/shm - else - export KOKORO_GFILE_DIR=$(mktemp -d -t ci-XXXXXXXX) - fi - SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" - GCLOUD_COMMANDS=("gcloud") -fi - -msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" -mkdir -p ${SECRET_LOCATION} - -for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") -do - msg "Retrieving secret ${key}" - "${GCLOUD_COMMANDS[@]}" \ - secrets versions access latest \ - --project cloud-devrel-kokoro-resources \ - --secret $key > \ - "$SECRET_LOCATION/$key" - if [[ $? == 0 ]]; then - msg "Secret written to ${SECRET_LOCATION}/${key}" - else - msg "Error retrieving secret ${key}" - exit 2 - fi -done diff --git a/.kokoro/presubmit/node12/common.cfg b/.kokoro/presubmit/node12/common.cfg deleted file mode 100644 index dbc82f69..00000000 --- a/.kokoro/presubmit/node12/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-datacatalog/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/test.sh" -} diff --git a/.kokoro/presubmit/node12/samples-test.cfg b/.kokoro/presubmit/node12/samples-test.cfg deleted file mode 100644 index 9cdb7ae8..00000000 --- a/.kokoro/presubmit/node12/samples-test.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/samples-test.sh" -} diff --git a/.kokoro/presubmit/node12/system-test.cfg b/.kokoro/presubmit/node12/system-test.cfg deleted file mode 100644 index ccd29b83..00000000 --- a/.kokoro/presubmit/node12/system-test.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/system-test.sh" -} diff --git a/.kokoro/presubmit/node12/test.cfg b/.kokoro/presubmit/node12/test.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/.kokoro/presubmit/node6/common.cfg b/.kokoro/presubmit/node6/common.cfg deleted file mode 100644 index 3d2fe7fb..00000000 --- a/.kokoro/presubmit/node6/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "google-cloud-node/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-cloud-node/.kokoro/test.sh" -} diff --git a/.kokoro/presubmit/node6/test.cfg b/.kokoro/presubmit/node6/test.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/.kokoro/presubmit/windows/common.cfg b/.kokoro/presubmit/windows/common.cfg deleted file mode 100644 index d6e25e0b..00000000 --- a/.kokoro/presubmit/windows/common.cfg +++ /dev/null @@ -1,2 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - diff --git a/.kokoro/presubmit/windows/test.cfg b/.kokoro/presubmit/windows/test.cfg deleted file mode 100644 index 088dabbe..00000000 --- a/.kokoro/presubmit/windows/test.cfg +++ /dev/null @@ -1,2 +0,0 @@ -# Use the test file directly -build_file: "nodejs-datacatalog/.kokoro/test.bat" diff --git a/.kokoro/publish.sh b/.kokoro/publish.sh deleted file mode 100755 index 949e3e1d..00000000 --- a/.kokoro/publish.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -export NPM_CONFIG_PREFIX=${HOME}/.npm-global - -# Start the releasetool reporter -python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script - -cd $(dirname $0)/.. - -NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-npm-token-1) -echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc - -npm install -npm publish --access=public --registry=https://wombat-dressing-room.appspot.com diff --git a/.kokoro/release/docs-devsite.cfg b/.kokoro/release/docs-devsite.cfg deleted file mode 100644 index 7f0e4c4b..00000000 --- a/.kokoro/release/docs-devsite.cfg +++ /dev/null @@ -1,26 +0,0 @@ -# service account used to publish up-to-date docs. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "docuploader_service_account" - } - } -} - -# doc publications use a Python image. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-datacatalog/.kokoro/trampoline_v2.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/release/docs-devsite.sh" -} diff --git a/.kokoro/release/docs-devsite.sh b/.kokoro/release/docs-devsite.sh deleted file mode 100755 index 2198e67f..00000000 --- a/.kokoro/release/docs-devsite.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# 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. - -set -eo pipefail - -if [[ -z "$CREDENTIALS" ]]; then - # if CREDENTIALS are explicitly set, assume we're testing locally - # and don't set NPM_CONFIG_PREFIX. - export NPM_CONFIG_PREFIX=${HOME}/.npm-global - export PATH="$PATH:${NPM_CONFIG_PREFIX}/bin" - cd $(dirname $0)/../.. -fi - -npm install -npm install --no-save @google-cloud/cloud-rad@^0.2.5 -npx @google-cloud/cloud-rad \ No newline at end of file diff --git a/.kokoro/release/docs.cfg b/.kokoro/release/docs.cfg deleted file mode 100644 index 0581788f..00000000 --- a/.kokoro/release/docs.cfg +++ /dev/null @@ -1,26 +0,0 @@ -# service account used to publish up-to-date docs. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "docuploader_service_account" - } - } -} - -# doc publications use a Python image. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-datacatalog/.kokoro/trampoline_v2.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/release/docs.sh" -} diff --git a/.kokoro/release/docs.sh b/.kokoro/release/docs.sh deleted file mode 100755 index 1d8f3f49..00000000 --- a/.kokoro/release/docs.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# build jsdocs (Python is installed on the Node 10 docker image). -if [[ -z "$CREDENTIALS" ]]; then - # if CREDENTIALS are explicitly set, assume we're testing locally - # and don't set NPM_CONFIG_PREFIX. - export NPM_CONFIG_PREFIX=${HOME}/.npm-global - export PATH="$PATH:${NPM_CONFIG_PREFIX}/bin" - cd $(dirname $0)/../.. -fi -npm install -npm run docs - -# create docs.metadata, based on package.json and .repo-metadata.json. -npm i json@9.0.6 -g -python3 -m docuploader create-metadata \ - --name=$(cat .repo-metadata.json | json name) \ - --version=$(cat package.json | json version) \ - --language=$(cat .repo-metadata.json | json language) \ - --distribution-name=$(cat .repo-metadata.json | json distribution_name) \ - --product-page=$(cat .repo-metadata.json | json product_documentation) \ - --github-repository=$(cat .repo-metadata.json | json repo) \ - --issue-tracker=$(cat .repo-metadata.json | json issue_tracker) -cp docs.metadata ./docs/docs.metadata - -# deploy the docs. -if [[ -z "$CREDENTIALS" ]]; then - CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account -fi -if [[ -z "$BUCKET" ]]; then - BUCKET=docs-staging -fi -python3 -m docuploader upload ./docs --credentials $CREDENTIALS --staging-bucket $BUCKET diff --git a/.kokoro/release/publish.cfg b/.kokoro/release/publish.cfg deleted file mode 100644 index 11b0b403..00000000 --- a/.kokoro/release/publish.cfg +++ /dev/null @@ -1,39 +0,0 @@ -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "docuploader_service_account" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "google-cloud-npm-token-1" - } - } -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "nodejs-datacatalog/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/nodejs-datacatalog/.kokoro/publish.sh" -} diff --git a/.kokoro/samples-test.sh b/.kokoro/samples-test.sh deleted file mode 100755 index fbc058a4..00000000 --- a/.kokoro/samples-test.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -export NPM_CONFIG_PREFIX=${HOME}/.npm-global - -# Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json -export GCLOUD_PROJECT=long-door-651 - -cd $(dirname $0)/.. - -# Run a pre-test hook, if a pre-samples-test.sh is in the project -if [ -f .kokoro/pre-samples-test.sh ]; then - set +x - . .kokoro/pre-samples-test.sh - set -x -fi - -if [ -f samples/package.json ]; then - npm install - - # Install and link samples - cd samples/ - npm link ../ - npm install - cd .. - # If tests are running against main branch, configure flakybot - # to open issues on failures: - if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then - export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml - export MOCHA_REPORTER=xunit - cleanup() { - chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot - $KOKORO_GFILE_DIR/linux_amd64/flakybot - } - trap cleanup EXIT HUP - fi - - npm run samples-test -fi - -# codecov combines coverage across integration and unit tests. Include -# the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 -if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then - NYC_BIN=./node_modules/nyc/bin/nyc.js - if [ -f "$NYC_BIN" ]; then - $NYC_BIN report || true - fi - bash $KOKORO_GFILE_DIR/codecov.sh -else - echo "coverage is only reported for Node $COVERAGE_NODE" -fi diff --git a/.kokoro/system-test.sh b/.kokoro/system-test.sh deleted file mode 100755 index 87fa0653..00000000 --- a/.kokoro/system-test.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -export NPM_CONFIG_PREFIX=${HOME}/.npm-global - -# Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json -export GCLOUD_PROJECT=long-door-651 - -cd $(dirname $0)/.. - -# Run a pre-test hook, if a pre-system-test.sh is in the project -if [ -f .kokoro/pre-system-test.sh ]; then - set +x - . .kokoro/pre-system-test.sh - set -x -fi - -npm install - -# If tests are running against main branch, configure flakybot -# to open issues on failures: -if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then - export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml - export MOCHA_REPORTER=xunit - cleanup() { - chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot - $KOKORO_GFILE_DIR/linux_amd64/flakybot - } - trap cleanup EXIT HUP -fi - -npm run system-test - -# codecov combines coverage across integration and unit tests. Include -# the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 -if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then - NYC_BIN=./node_modules/nyc/bin/nyc.js - if [ -f "$NYC_BIN" ]; then - $NYC_BIN report || true - fi - bash $KOKORO_GFILE_DIR/codecov.sh -else - echo "coverage is only reported for Node $COVERAGE_NODE" -fi diff --git a/.kokoro/test.bat b/.kokoro/test.bat deleted file mode 100644 index ae59e59b..00000000 --- a/.kokoro/test.bat +++ /dev/null @@ -1,33 +0,0 @@ -@rem Copyright 2018 Google LLC. All rights reserved. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem http://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. - -@echo "Starting Windows build" - -cd /d %~dp0 -cd .. - -@rem npm path is not currently set in our image, we should fix this next time -@rem we upgrade Node.js in the image: -SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm - -call nvm use v12.14.1 -call which node - -call npm install || goto :error -call npm run test || goto :error - -goto :EOF - -:error -exit /b 1 diff --git a/.kokoro/test.sh b/.kokoro/test.sh deleted file mode 100755 index a5c7ac04..00000000 --- a/.kokoro/test.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -export NPM_CONFIG_PREFIX=${HOME}/.npm-global - -cd $(dirname $0)/.. - -npm install -# If tests are running against main branch, configure flakybot -# to open issues on failures: -if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then - export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml - export MOCHA_REPORTER=xunit - cleanup() { - chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot - $KOKORO_GFILE_DIR/linux_amd64/flakybot - } - trap cleanup EXIT HUP -fi -# Unit tests exercise the entire API surface, which may include -# deprecation warnings: -export MOCHA_THROW_DEPRECATION=false -npm test - -# codecov combines coverage across integration and unit tests. Include -# the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 -if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then - NYC_BIN=./node_modules/nyc/bin/nyc.js - if [ -f "$NYC_BIN" ]; then - $NYC_BIN report || true - fi - bash $KOKORO_GFILE_DIR/codecov.sh -else - echo "coverage is only reported for Node $COVERAGE_NODE" -fi diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh deleted file mode 100755 index f693a1ce..00000000 --- a/.kokoro/trampoline.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Copyright 2017 Google Inc. -# -# Licensed under the Apache License, Version 2.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. - -# This file is not used any more, but we keep this file for making it -# easy to roll back. -# TODO: Remove this file from the template. - -set -eo pipefail - -# Always run the cleanup script, regardless of the success of bouncing into -# the container. -function cleanup() { - chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - echo "cleanup"; -} -trap cleanup EXIT - -$(dirname $0)/populate-secrets.sh # Secret Manager secrets. -python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.kokoro/trampoline_v2.sh b/.kokoro/trampoline_v2.sh deleted file mode 100755 index 4d031121..00000000 --- a/.kokoro/trampoline_v2.sh +++ /dev/null @@ -1,490 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.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. - -# trampoline_v2.sh -# -# If you want to make a change to this file, consider doing so at: -# https://github.com/googlecloudplatform/docker-ci-helper -# -# This script is for running CI builds. For Kokoro builds, we -# set this script to `build_file` field in the Kokoro configuration. - -# This script does 3 things. -# -# 1. Prepare the Docker image for the test -# 2. Run the Docker with appropriate flags to run the test -# 3. Upload the newly built Docker image -# -# in a way that is somewhat compatible with trampoline_v1. -# -# These environment variables are required: -# TRAMPOLINE_IMAGE: The docker image to use. -# TRAMPOLINE_DOCKERFILE: The location of the Dockerfile. -# -# You can optionally change these environment variables: -# TRAMPOLINE_IMAGE_UPLOAD: -# (true|false): Whether to upload the Docker image after the -# successful builds. -# TRAMPOLINE_BUILD_FILE: The script to run in the docker container. -# TRAMPOLINE_WORKSPACE: The workspace path in the docker container. -# Defaults to /workspace. -# Potentially there are some repo specific envvars in .trampolinerc in -# the project root. -# -# Here is an example for running this script. -# TRAMPOLINE_IMAGE=gcr.io/cloud-devrel-kokoro-resources/node:10-user \ -# TRAMPOLINE_BUILD_FILE=.kokoro/system-test.sh \ -# .kokoro/trampoline_v2.sh - -set -euo pipefail - -TRAMPOLINE_VERSION="2.0.7" - -if command -v tput >/dev/null && [[ -n "${TERM:-}" ]]; then - readonly IO_COLOR_RED="$(tput setaf 1)" - readonly IO_COLOR_GREEN="$(tput setaf 2)" - readonly IO_COLOR_YELLOW="$(tput setaf 3)" - readonly IO_COLOR_RESET="$(tput sgr0)" -else - readonly IO_COLOR_RED="" - readonly IO_COLOR_GREEN="" - readonly IO_COLOR_YELLOW="" - readonly IO_COLOR_RESET="" -fi - -function function_exists { - [ $(LC_ALL=C type -t $1)"" == "function" ] -} - -# Logs a message using the given color. The first argument must be one -# of the IO_COLOR_* variables defined above, such as -# "${IO_COLOR_YELLOW}". The remaining arguments will be logged in the -# given color. The log message will also have an RFC-3339 timestamp -# prepended (in UTC). You can disable the color output by setting -# TERM=vt100. -function log_impl() { - local color="$1" - shift - local timestamp="$(date -u "+%Y-%m-%dT%H:%M:%SZ")" - echo "================================================================" - echo "${color}${timestamp}:" "$@" "${IO_COLOR_RESET}" - echo "================================================================" -} - -# Logs the given message with normal coloring and a timestamp. -function log() { - log_impl "${IO_COLOR_RESET}" "$@" -} - -# Logs the given message in green with a timestamp. -function log_green() { - log_impl "${IO_COLOR_GREEN}" "$@" -} - -# Logs the given message in yellow with a timestamp. -function log_yellow() { - log_impl "${IO_COLOR_YELLOW}" "$@" -} - -# Logs the given message in red with a timestamp. -function log_red() { - log_impl "${IO_COLOR_RED}" "$@" -} - -readonly tmpdir=$(mktemp -d -t ci-XXXXXXXX) -readonly tmphome="${tmpdir}/h" -mkdir -p "${tmphome}" - -function cleanup() { - rm -rf "${tmpdir}" -} -trap cleanup EXIT - -RUNNING_IN_CI="${RUNNING_IN_CI:-false}" - -# The workspace in the container, defaults to /workspace. -TRAMPOLINE_WORKSPACE="${TRAMPOLINE_WORKSPACE:-/workspace}" - -pass_down_envvars=( - # TRAMPOLINE_V2 variables. - # Tells scripts whether they are running as part of CI or not. - "RUNNING_IN_CI" - # Indicates which CI system we're in. - "TRAMPOLINE_CI" - # Indicates the version of the script. - "TRAMPOLINE_VERSION" - # Contains path to build artifacts being executed. - "KOKORO_BUILD_ARTIFACTS_SUBDIR" -) - -log_yellow "Building with Trampoline ${TRAMPOLINE_VERSION}" - -# Detect which CI systems we're in. If we're in any of the CI systems -# we support, `RUNNING_IN_CI` will be true and `TRAMPOLINE_CI` will be -# the name of the CI system. Both envvars will be passing down to the -# container for telling which CI system we're in. -if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then - # descriptive env var for indicating it's on CI. - RUNNING_IN_CI="true" - TRAMPOLINE_CI="kokoro" - if [[ "${TRAMPOLINE_USE_LEGACY_SERVICE_ACCOUNT:-}" == "true" ]]; then - if [[ ! -f "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json" ]]; then - log_red "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json does not exist. Did you forget to mount cloud-devrel-kokoro-resources/trampoline? Aborting." - exit 1 - fi - # This service account will be activated later. - TRAMPOLINE_SERVICE_ACCOUNT="${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json" - else - if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then - gcloud auth list - fi - log_yellow "Configuring Container Registry access" - gcloud auth configure-docker --quiet - fi - pass_down_envvars+=( - # KOKORO dynamic variables. - "KOKORO_BUILD_NUMBER" - "KOKORO_BUILD_ID" - "KOKORO_JOB_NAME" - "KOKORO_GIT_COMMIT" - "KOKORO_GITHUB_COMMIT" - "KOKORO_GITHUB_PULL_REQUEST_NUMBER" - "KOKORO_GITHUB_PULL_REQUEST_COMMIT" - # For flakybot - "KOKORO_GITHUB_COMMIT_URL" - "KOKORO_GITHUB_PULL_REQUEST_URL" - ) -elif [[ "${TRAVIS:-}" == "true" ]]; then - RUNNING_IN_CI="true" - TRAMPOLINE_CI="travis" - pass_down_envvars+=( - "TRAVIS_BRANCH" - "TRAVIS_BUILD_ID" - "TRAVIS_BUILD_NUMBER" - "TRAVIS_BUILD_WEB_URL" - "TRAVIS_COMMIT" - "TRAVIS_COMMIT_MESSAGE" - "TRAVIS_COMMIT_RANGE" - "TRAVIS_JOB_NAME" - "TRAVIS_JOB_NUMBER" - "TRAVIS_JOB_WEB_URL" - "TRAVIS_PULL_REQUEST" - "TRAVIS_PULL_REQUEST_BRANCH" - "TRAVIS_PULL_REQUEST_SHA" - "TRAVIS_PULL_REQUEST_SLUG" - "TRAVIS_REPO_SLUG" - "TRAVIS_SECURE_ENV_VARS" - "TRAVIS_TAG" - ) -elif [[ -n "${GITHUB_RUN_ID:-}" ]]; then - RUNNING_IN_CI="true" - TRAMPOLINE_CI="github-workflow" - pass_down_envvars+=( - "GITHUB_WORKFLOW" - "GITHUB_RUN_ID" - "GITHUB_RUN_NUMBER" - "GITHUB_ACTION" - "GITHUB_ACTIONS" - "GITHUB_ACTOR" - "GITHUB_REPOSITORY" - "GITHUB_EVENT_NAME" - "GITHUB_EVENT_PATH" - "GITHUB_SHA" - "GITHUB_REF" - "GITHUB_HEAD_REF" - "GITHUB_BASE_REF" - ) -elif [[ "${CIRCLECI:-}" == "true" ]]; then - RUNNING_IN_CI="true" - TRAMPOLINE_CI="circleci" - pass_down_envvars+=( - "CIRCLE_BRANCH" - "CIRCLE_BUILD_NUM" - "CIRCLE_BUILD_URL" - "CIRCLE_COMPARE_URL" - "CIRCLE_JOB" - "CIRCLE_NODE_INDEX" - "CIRCLE_NODE_TOTAL" - "CIRCLE_PREVIOUS_BUILD_NUM" - "CIRCLE_PROJECT_REPONAME" - "CIRCLE_PROJECT_USERNAME" - "CIRCLE_REPOSITORY_URL" - "CIRCLE_SHA1" - "CIRCLE_STAGE" - "CIRCLE_USERNAME" - "CIRCLE_WORKFLOW_ID" - "CIRCLE_WORKFLOW_JOB_ID" - "CIRCLE_WORKFLOW_UPSTREAM_JOB_IDS" - "CIRCLE_WORKFLOW_WORKSPACE_ID" - ) -fi - -# Configure the service account for pulling the docker image. -function repo_root() { - local dir="$1" - while [[ ! -d "${dir}/.git" ]]; do - dir="$(dirname "$dir")" - done - echo "${dir}" -} - -# Detect the project root. In CI builds, we assume the script is in -# the git tree and traverse from there, otherwise, traverse from `pwd` -# to find `.git` directory. -if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then - PROGRAM_PATH="$(realpath "$0")" - PROGRAM_DIR="$(dirname "${PROGRAM_PATH}")" - PROJECT_ROOT="$(repo_root "${PROGRAM_DIR}")" -else - PROJECT_ROOT="$(repo_root $(pwd))" -fi - -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - -# To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need -# to use this environment variable in `PROJECT_ROOT`. -if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then - - mkdir -p "${tmpdir}/gcloud" - gcloud_config_dir="${tmpdir}/gcloud" - - log_yellow "Using isolated gcloud config: ${gcloud_config_dir}." - export CLOUDSDK_CONFIG="${gcloud_config_dir}" - - log_yellow "Using ${TRAMPOLINE_SERVICE_ACCOUNT} for authentication." - gcloud auth activate-service-account \ - --key-file "${TRAMPOLINE_SERVICE_ACCOUNT}" - log_yellow "Configuring Container Registry access" - gcloud auth configure-docker --quiet -fi - -required_envvars=( - # The basic trampoline configurations. - "TRAMPOLINE_IMAGE" - "TRAMPOLINE_BUILD_FILE" -) - -if [[ -f "${PROJECT_ROOT}/.trampolinerc" ]]; then - source "${PROJECT_ROOT}/.trampolinerc" -fi - -log_yellow "Checking environment variables." -for e in "${required_envvars[@]}" -do - if [[ -z "${!e:-}" ]]; then - log "Missing ${e} env var. Aborting." - exit 1 - fi -done - -# We want to support legacy style TRAMPOLINE_BUILD_FILE used with V1 -# script: e.g. "github/repo-name/.kokoro/run_tests.sh" -TRAMPOLINE_BUILD_FILE="${TRAMPOLINE_BUILD_FILE#github/*/}" -log_yellow "Using TRAMPOLINE_BUILD_FILE: ${TRAMPOLINE_BUILD_FILE}" - -# ignore error on docker operations and test execution -set +e - -log_yellow "Preparing Docker image." -# We only download the docker image in CI builds. -if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then - # Download the docker image specified by `TRAMPOLINE_IMAGE` - - # We may want to add --max-concurrent-downloads flag. - - log_yellow "Start pulling the Docker image: ${TRAMPOLINE_IMAGE}." - if docker pull "${TRAMPOLINE_IMAGE}"; then - log_green "Finished pulling the Docker image: ${TRAMPOLINE_IMAGE}." - has_image="true" - else - log_red "Failed pulling the Docker image: ${TRAMPOLINE_IMAGE}." - has_image="false" - fi -else - # For local run, check if we have the image. - if docker images "${TRAMPOLINE_IMAGE}" | grep "${TRAMPOLINE_IMAGE%:*}"; then - has_image="true" - else - has_image="false" - fi -fi - - -# The default user for a Docker container has uid 0 (root). To avoid -# creating root-owned files in the build directory we tell docker to -# use the current user ID. -user_uid="$(id -u)" -user_gid="$(id -g)" -user_name="$(id -un)" - -# To allow docker in docker, we add the user to the docker group in -# the host os. -docker_gid=$(cut -d: -f3 < <(getent group docker)) - -update_cache="false" -if [[ "${TRAMPOLINE_DOCKERFILE:-none}" != "none" ]]; then - # Build the Docker image from the source. - context_dir=$(dirname "${TRAMPOLINE_DOCKERFILE}") - docker_build_flags=( - "-f" "${TRAMPOLINE_DOCKERFILE}" - "-t" "${TRAMPOLINE_IMAGE}" - "--build-arg" "UID=${user_uid}" - "--build-arg" "USERNAME=${user_name}" - ) - if [[ "${has_image}" == "true" ]]; then - docker_build_flags+=("--cache-from" "${TRAMPOLINE_IMAGE}") - fi - - log_yellow "Start building the docker image." - if [[ "${TRAMPOLINE_VERBOSE:-false}" == "true" ]]; then - echo "docker build" "${docker_build_flags[@]}" "${context_dir}" - fi - - # ON CI systems, we want to suppress docker build logs, only - # output the logs when it fails. - if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then - if docker build "${docker_build_flags[@]}" "${context_dir}" \ - > "${tmpdir}/docker_build.log" 2>&1; then - if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then - cat "${tmpdir}/docker_build.log" - fi - - log_green "Finished building the docker image." - update_cache="true" - else - log_red "Failed to build the Docker image, aborting." - log_yellow "Dumping the build logs:" - cat "${tmpdir}/docker_build.log" - exit 1 - fi - else - if docker build "${docker_build_flags[@]}" "${context_dir}"; then - log_green "Finished building the docker image." - update_cache="true" - else - log_red "Failed to build the Docker image, aborting." - exit 1 - fi - fi -else - if [[ "${has_image}" != "true" ]]; then - log_red "We do not have ${TRAMPOLINE_IMAGE} locally, aborting." - exit 1 - fi -fi - -# We use an array for the flags so they are easier to document. -docker_flags=( - # Remove the container after it exists. - "--rm" - - # Use the host network. - "--network=host" - - # Run in priviledged mode. We are not using docker for sandboxing or - # isolation, just for packaging our dev tools. - "--privileged" - - # Run the docker script with the user id. Because the docker image gets to - # write in ${PWD} you typically want this to be your user id. - # To allow docker in docker, we need to use docker gid on the host. - "--user" "${user_uid}:${docker_gid}" - - # Pass down the USER. - "--env" "USER=${user_name}" - - # Mount the project directory inside the Docker container. - "--volume" "${PROJECT_ROOT}:${TRAMPOLINE_WORKSPACE}" - "--workdir" "${TRAMPOLINE_WORKSPACE}" - "--env" "PROJECT_ROOT=${TRAMPOLINE_WORKSPACE}" - - # Mount the temporary home directory. - "--volume" "${tmphome}:/h" - "--env" "HOME=/h" - - # Allow docker in docker. - "--volume" "/var/run/docker.sock:/var/run/docker.sock" - - # Mount the /tmp so that docker in docker can mount the files - # there correctly. - "--volume" "/tmp:/tmp" - # Pass down the KOKORO_GFILE_DIR and KOKORO_KEYSTORE_DIR - # TODO(tmatsuo): This part is not portable. - "--env" "TRAMPOLINE_SECRET_DIR=/secrets" - "--volume" "${KOKORO_GFILE_DIR:-/dev/shm}:/secrets/gfile" - "--env" "KOKORO_GFILE_DIR=/secrets/gfile" - "--volume" "${KOKORO_KEYSTORE_DIR:-/dev/shm}:/secrets/keystore" - "--env" "KOKORO_KEYSTORE_DIR=/secrets/keystore" -) - -# Add an option for nicer output if the build gets a tty. -if [[ -t 0 ]]; then - docker_flags+=("-it") -fi - -# Passing down env vars -for e in "${pass_down_envvars[@]}" -do - if [[ -n "${!e:-}" ]]; then - docker_flags+=("--env" "${e}=${!e}") - fi -done - -# If arguments are given, all arguments will become the commands run -# in the container, otherwise run TRAMPOLINE_BUILD_FILE. -if [[ $# -ge 1 ]]; then - log_yellow "Running the given commands '" "${@:1}" "' in the container." - readonly commands=("${@:1}") - if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then - echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}" - fi - docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}" -else - log_yellow "Running the tests in a Docker container." - docker_flags+=("--entrypoint=${TRAMPOLINE_BUILD_FILE}") - if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then - echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" - fi - docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" -fi - - -test_retval=$? - -if [[ ${test_retval} -eq 0 ]]; then - log_green "Build finished with ${test_retval}" -else - log_red "Build finished with ${test_retval}" -fi - -# Only upload it when the test passes. -if [[ "${update_cache}" == "true" ]] && \ - [[ $test_retval == 0 ]] && \ - [[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]]; then - log_yellow "Uploading the Docker image." - if docker push "${TRAMPOLINE_IMAGE}"; then - log_green "Finished uploading the Docker image." - else - log_red "Failed uploading the Docker image." - fi - # Call trampoline_after_upload_hook if it's defined. - if function_exists trampoline_after_upload_hook; then - trampoline_after_upload_hook - fi - -fi - -exit "${test_retval}" diff --git a/.mocharc.js b/.mocharc.js deleted file mode 100644 index 0b600509..00000000 --- a/.mocharc.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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. -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000, - "recursive": true -} -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/.nycrc b/.nycrc deleted file mode 100644 index b18d5472..00000000 --- a/.nycrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "report-dir": "./.coverage", - "reporter": ["text", "lcov"], - "exclude": [ - "**/*-test", - "**/.coverage", - "**/apis", - "**/benchmark", - "**/conformance", - "**/docs", - "**/samples", - "**/scripts", - "**/protos", - "**/test", - "**/*.d.ts", - ".jsdoc.js", - "**/.jsdoc.js", - "karma.conf.js", - "webpack-tests.config.js", - "webpack.config.js" - ], - "exclude-after-remap": false, - "all": true -} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 9340ad9b..00000000 --- a/.prettierignore +++ /dev/null @@ -1,6 +0,0 @@ -**/node_modules -**/coverage -test/fixtures -build/ -docs/ -protos/ diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index d1b95106..00000000 --- a/.prettierrc.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/.repo-metadata.json b/.repo-metadata.json deleted file mode 100644 index 0e199bf9..00000000 --- a/.repo-metadata.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "default_version": "v1", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/nodejs/docs/reference/datacatalog/latest", - "name": "datacatalog", - "product_documentation": "https://cloud.google.com/data-catalog/", - "distribution_name": "@google-cloud/datacatalog", - "language": "nodejs", - "api_id": "datacatalog.googleapis.com", - "repo": "googleapis/nodejs-datacatalog", - "name_pretty": "Data Catalog", - "issue_tracker": "", - "requires_billing": true, - "api_shortname": "datacatalog", - "library_type": "GAPIC_AUTO" -} diff --git a/.trampolinerc b/.trampolinerc deleted file mode 100644 index 5fc22531..00000000 --- a/.trampolinerc +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.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. - -# Template for .trampolinerc - -# Add required env vars here. -required_envvars+=( -) - -# Add env vars which are passed down into the container here. -pass_down_envvars+=( - "AUTORELEASE_PR" - "VERSION" -) - -# Prevent unintentional override on the default image. -if [[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]] && \ - [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then - echo "Please set TRAMPOLINE_IMAGE if you want to upload the Docker image." - exit 1 -fi - -# Define the default value if it makes sense. -if [[ -z "${TRAMPOLINE_IMAGE_UPLOAD:-}" ]]; then - TRAMPOLINE_IMAGE_UPLOAD="" -fi - -if [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then - TRAMPOLINE_IMAGE="" -fi - -if [[ -z "${TRAMPOLINE_DOCKERFILE:-}" ]]; then - TRAMPOLINE_DOCKERFILE="" -fi - -if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then - TRAMPOLINE_BUILD_FILE="" -fi - -# Secret Manager secrets. -source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index cfb24f9b..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,345 +0,0 @@ -# Changelog - -[npm history][1] - -[1]: https://www.npmjs.com/package/@google-cloud/datacatalog?activeTab=versions - -## [3.1.1](https://github.com/googleapis/nodejs-datacatalog/compare/v3.1.0...v3.1.1) (2022-11-30) - - -### Bug Fixes - -* Allow passing gax instance to client constructor ([#381](https://github.com/googleapis/nodejs-datacatalog/issues/381)) ([09e38fc](https://github.com/googleapis/nodejs-datacatalog/commit/09e38fc4bbe42f76c7048b58b4e749586ed8bd3a)) -* Better support for fallback mode ([#377](https://github.com/googleapis/nodejs-datacatalog/issues/377)) ([3cc0c79](https://github.com/googleapis/nodejs-datacatalog/commit/3cc0c79704459b18e71059986fa26a28ce6dca2f)) -* Change datacatalog resource name config ([#373](https://github.com/googleapis/nodejs-datacatalog/issues/373)) ([ee48f14](https://github.com/googleapis/nodejs-datacatalog/commit/ee48f149efa740286de5472d959025fca9d13341)) -* Change import long to require ([#378](https://github.com/googleapis/nodejs-datacatalog/issues/378)) ([e133668](https://github.com/googleapis/nodejs-datacatalog/commit/e13366806c759569f016b2813877d7295c6a5673)) -* **deps:** Update dependency uuid to v9 ([#382](https://github.com/googleapis/nodejs-datacatalog/issues/382)) ([86da005](https://github.com/googleapis/nodejs-datacatalog/commit/86da005a32c303017bfa4113535cb2f64dde1f79)) -* **deps:** Use google-gax v3.5.2 ([#391](https://github.com/googleapis/nodejs-datacatalog/issues/391)) ([0f96b18](https://github.com/googleapis/nodejs-datacatalog/commit/0f96b18f20f5a5e46a6de46558b74e06ff6b9cdc)) -* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-datacatalog/issues/1553)) ([#380](https://github.com/googleapis/nodejs-datacatalog/issues/380)) ([d969272](https://github.com/googleapis/nodejs-datacatalog/commit/d969272a2414f75edbf0aed8fd2ccffb7daee5d7)) -* Preserve default values in x-goog-request-params header ([#384](https://github.com/googleapis/nodejs-datacatalog/issues/384)) ([6c1cb6b](https://github.com/googleapis/nodejs-datacatalog/commit/6c1cb6b278daaf1412eaaf9b37f6e717fea5dd70)) -* Regenerated protos JS and TS definitions ([#394](https://github.com/googleapis/nodejs-datacatalog/issues/394)) ([bd17961](https://github.com/googleapis/nodejs-datacatalog/commit/bd17961056fa07ec26faf7ff4227a951bb5d61d0)) -* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-datacatalog/issues/1546)) ([#379](https://github.com/googleapis/nodejs-datacatalog/issues/379)) ([6244345](https://github.com/googleapis/nodejs-datacatalog/commit/6244345cf4d04c8ad567a734a496c979432c568d)) -* use google-gax v3.3.0 ([d969272](https://github.com/googleapis/nodejs-datacatalog/commit/d969272a2414f75edbf0aed8fd2ccffb7daee5d7)) - -## [3.1.0](https://github.com/googleapis/nodejs-datacatalog/compare/v3.0.0...v3.1.0) (2022-07-05) - - -### Features - -* support regapic LRO ([a6fa419](https://github.com/googleapis/nodejs-datacatalog/commit/a6fa419299bae1d425477387eae3853dc343c69b)) - -## [3.0.0](https://github.com/googleapis/nodejs-datacatalog/compare/v2.6.0...v3.0.0) (2022-06-10) - - -### ⚠ BREAKING CHANGES - -* update library to use Node 12 (#362) - -### Features - -* AuditConfig for IAM v1 ([#349](https://github.com/googleapis/nodejs-datacatalog/issues/349)) ([39a829e](https://github.com/googleapis/nodejs-datacatalog/commit/39a829e7da308c9b1c91e347c8729bfbc5ba39c8)) - - -### Bug Fixes - -* **deps:** roll back dependency @google-cloud/datacatalog to ^2.5.0 ([#345](https://github.com/googleapis/nodejs-datacatalog/issues/345)) ([5fc48ab](https://github.com/googleapis/nodejs-datacatalog/commit/5fc48ab5bae55c0bc1f62a1418eaa74a8fae1034)) -* **deps:** update dependency @google-cloud/bigquery to v6 ([#365](https://github.com/googleapis/nodejs-datacatalog/issues/365)) ([4d966a1](https://github.com/googleapis/nodejs-datacatalog/commit/4d966a161e034142ad7db54c0c06dc962199caad)) - - -### Build System - -* update library to use Node 12 ([#362](https://github.com/googleapis/nodejs-datacatalog/issues/362)) ([9d8688b](https://github.com/googleapis/nodejs-datacatalog/commit/9d8688bcf7c9f1ddc4c3cfe0f05d69b138198ec8)) - -## [2.6.0](https://github.com/googleapis/nodejs-datacatalog/compare/v2.5.0...v2.6.0) (2022-02-08) - - -### Features - -* Add methods and messages related to starring feature feat: Add methods and messages related to business context feature docs: Updates copyright message ([#328](https://github.com/googleapis/nodejs-datacatalog/issues/328)) ([585a7b2](https://github.com/googleapis/nodejs-datacatalog/commit/585a7b2e456ca5ddabb3752c0a56356e2564b80b)) - -## [2.5.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.4.2...v2.5.0) (2021-08-23) - - -### Features - -* turns on self-signed JWT feature flag ([#294](https://www.github.com/googleapis/nodejs-datacatalog/issues/294)) ([dcf6fb4](https://www.github.com/googleapis/nodejs-datacatalog/commit/dcf6fb45de49e225aeebfec9fc56251db3a702e9)) - -### [2.4.2](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.4.1...v2.4.2) (2021-08-17) - - -### Bug Fixes - -* **deps:** google-gax v2.24.1 ([#291](https://www.github.com/googleapis/nodejs-datacatalog/issues/291)) ([b9f80cd](https://www.github.com/googleapis/nodejs-datacatalog/commit/b9f80cd961a516c967d20c66b3752cadd9ed9546)) - -### [2.4.1](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.4.0...v2.4.1) (2021-08-14) - - -### Bug Fixes - -* **build:** migrate to using main branch ([#285](https://www.github.com/googleapis/nodejs-datacatalog/issues/285)) ([b096a25](https://www.github.com/googleapis/nodejs-datacatalog/commit/b096a25ee41b61feb28e262e0024f743f88a6444)) - -## [2.4.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.3.4...v2.4.0) (2021-08-05) - - -### Features - -* Added support for BigQuery connections entries feat: Added support for BigQuery routines entries feat: Added usage_signal field feat: Added labels field feat: Added ReplaceTaxonomy in Policy Tag Manager Serialization API feat: Added support for p... ([#277](https://www.github.com/googleapis/nodejs-datacatalog/issues/277)) ([328cc11](https://www.github.com/googleapis/nodejs-datacatalog/commit/328cc1126374a26f20273a312e8b781b845af401)) - -### [2.3.4](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.3.3...v2.3.4) (2021-07-21) - - -### Bug Fixes - -* **deps:** google-gax v2.17.1 ([#272](https://www.github.com/googleapis/nodejs-datacatalog/issues/272)) ([62ffcc6](https://www.github.com/googleapis/nodejs-datacatalog/commit/62ffcc6fd9a5b68936a57c1ac5a041527e38fec3)) -* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#274](https://www.github.com/googleapis/nodejs-datacatalog/issues/274)) ([3ebafcd](https://www.github.com/googleapis/nodejs-datacatalog/commit/3ebafcdbfaf50ff96f9d828e33cc355af33a7000)) - -### [2.3.3](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.3.2...v2.3.3) (2021-06-30) - - -### Bug Fixes - -* **deps:** google-gax v2.17.0 with mTLS ([#269](https://www.github.com/googleapis/nodejs-datacatalog/issues/269)) ([456a228](https://www.github.com/googleapis/nodejs-datacatalog/commit/456a2288a0a6ba21add6662e23bb256c2e4cbdf0)) - -### [2.3.2](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.3.1...v2.3.2) (2021-06-24) - - -### Bug Fixes - -* make request optional in all cases ([#265](https://www.github.com/googleapis/nodejs-datacatalog/issues/265)) ([3ea98f3](https://www.github.com/googleapis/nodejs-datacatalog/commit/3ea98f3b9fb00f0804557b5f597366a4963fdf7c)) - -### [2.3.1](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.3.0...v2.3.1) (2021-05-07) - - -### Bug Fixes - -* **deps:** require google-gax v2.12.0 ([#249](https://www.github.com/googleapis/nodejs-datacatalog/issues/249)) ([a9ac95e](https://www.github.com/googleapis/nodejs-datacatalog/commit/a9ac95edc6aebe638cc6408540e9f74a6c1f8d3d)) - -## [2.3.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.2.0...v2.3.0) (2021-04-27) - - -### Features - -* new RenameTagTemplateFieldEnumValue API ([#244](https://www.github.com/googleapis/nodejs-datacatalog/issues/244)) ([1efaf9b](https://www.github.com/googleapis/nodejs-datacatalog/commit/1efaf9be12b84135643761cf01372726ec7dd249)) - -## [2.2.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.1.3...v2.2.0) (2021-03-07) - - -### Features - -* **samples:** add samples ([#229](https://www.github.com/googleapis/nodejs-datacatalog/issues/229)) ([fd8a249](https://www.github.com/googleapis/nodejs-datacatalog/commit/fd8a2496013db9737dbd21c30fc412c24a5956d8)) - -### [2.1.3](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.1.2...v2.1.3) (2020-11-07) - - -### Bug Fixes - -* do not modify options object, use defaultScopes ([#218](https://www.github.com/googleapis/nodejs-datacatalog/issues/218)) ([4dad92a](https://www.github.com/googleapis/nodejs-datacatalog/commit/4dad92a4781e0bf3b6bd799ca0aefe94b10e6254)) - -### [2.1.2](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.1.1...v2.1.2) (2020-07-27) - - -### Bug Fixes - -* move gitattributes files to node templates ([#194](https://www.github.com/googleapis/nodejs-datacatalog/issues/194)) ([6471c23](https://www.github.com/googleapis/nodejs-datacatalog/commit/6471c23598674fb85bdb4a733dcdd3a7799ce314)) - -### [2.1.1](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.1.0...v2.1.1) (2020-07-09) - - -### Bug Fixes - -* typeo in nodejs .gitattribute ([#182](https://www.github.com/googleapis/nodejs-datacatalog/issues/182)) ([9e46bfc](https://www.github.com/googleapis/nodejs-datacatalog/commit/9e46bfce7847084d24d85218d5a294ff7c46e2ff)) - -## [2.1.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v2.0.0...v2.1.0) (2020-06-16) - - -### Features - -* add order field to TagField and TagTemplateField ([#157](https://www.github.com/googleapis/nodejs-datacatalog/issues/157)) ([70c23c2](https://www.github.com/googleapis/nodejs-datacatalog/commit/70c23c2b609bd24901dc902090e23fbf92b55895)) -* move ts target to es2018 from es2016 ([#172](https://www.github.com/googleapis/nodejs-datacatalog/issues/172)) ([e354dde](https://www.github.com/googleapis/nodejs-datacatalog/commit/e354ddeeeedd3e106c50ed579075f23c9d9c5bb5)) -* promote library to GA ([#177](https://www.github.com/googleapis/nodejs-datacatalog/issues/177)) ([ac11090](https://www.github.com/googleapis/nodejs-datacatalog/commit/ac110906b723f362024318295e3de6743c905b7e)) - - -### Bug Fixes - -* proper fallback option handling ([51df672](https://www.github.com/googleapis/nodejs-datacatalog/commit/51df6721306ab6d2d9bf6919b0f3f432ca85b4ab)) -* regenerate unit tests ([#163](https://www.github.com/googleapis/nodejs-datacatalog/issues/163)) ([4593117](https://www.github.com/googleapis/nodejs-datacatalog/commit/45931176d266d364e0508039cf6a4e284ad2923d)) -* synth.py clean up for multiple version ([#167](https://www.github.com/googleapis/nodejs-datacatalog/issues/167)) ([c799604](https://www.github.com/googleapis/nodejs-datacatalog/commit/c799604b2d29269006ff39748afb78302ce46ca2)) - -## [2.0.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.8.0...v2.0.0) (2020-04-15) - - -### ⚠ BREAKING CHANGES - -* add v1 API surface (#145) -* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. - -### Features - -* add v1 API surface ([#145](https://www.github.com/googleapis/nodejs-datacatalog/issues/145)) ([e04c394](https://www.github.com/googleapis/nodejs-datacatalog/commit/e04c3948784950ae536e2dd1b123515996912be1)) -* drop node8 support, support for async iterators ([#140](https://www.github.com/googleapis/nodejs-datacatalog/issues/140)) ([cf658e8](https://www.github.com/googleapis/nodejs-datacatalog/commit/cf658e88470706f502d71f0cfc8655ca5856113c)) - - -### Bug Fixes - -* export explicit version in protos.js ([#146](https://www.github.com/googleapis/nodejs-datacatalog/issues/146)) ([04d1cbb](https://www.github.com/googleapis/nodejs-datacatalog/commit/04d1cbbd25ffb13c8312080f1e1d9ac27eb85490)) -* remove eslint, update gax, fix generated protos, run the generator ([#150](https://www.github.com/googleapis/nodejs-datacatalog/issues/150)) ([57223c0](https://www.github.com/googleapis/nodejs-datacatalog/commit/57223c036833bc3cf044181eb376a2b5c173cc63)) - -## [1.8.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.7.0...v1.8.0) (2020-03-06) - - -### Features - -* deferred client initialization ([#127](https://www.github.com/googleapis/nodejs-datacatalog/issues/127)) ([1640d4d](https://www.github.com/googleapis/nodejs-datacatalog/commit/1640d4d8fe1a9adbff9719399e5e2fff95bbb4b5)) -* export protos in src/index.ts ([86933a1](https://www.github.com/googleapis/nodejs-datacatalog/commit/86933a113549c33a5283e7bf438ce0229b74155b)) - -## [1.7.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.6.3...v1.7.0) (2020-02-10) - - -### Features - -* UpdateEntryGroup, ListEntryGroup, ListEntries added ([#110](https://www.github.com/googleapis/nodejs-datacatalog/issues/110)) ([0597b71](https://www.github.com/googleapis/nodejs-datacatalog/commit/0597b71acbcb45cd7bb37668310c439378703894)) - - -### Bug Fixes - -* resource name helpers fixed; enum, bytes, and Long types now accept strings ([#99](https://www.github.com/googleapis/nodejs-datacatalog/issues/99)) ([d20988f](https://www.github.com/googleapis/nodejs-datacatalog/commit/d20988ff58c38a7a79c0ab768a1af32cae6686df)) - -### [1.6.3](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.6.2...v1.6.3) (2020-01-09) - - -### Bug Fixes - -* proper routing headers ([1fc10d6](https://www.github.com/googleapis/nodejs-datacatalog/commit/1fc10d6e538fd2c6a43e160318e6b75c6e0d32e5)) - -### [1.6.2](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.6.1...v1.6.2) (2020-01-08) - - -### Bug Fixes - -* **build:** switch back to using autorelease for tagging ([#91](https://www.github.com/googleapis/nodejs-datacatalog/issues/91)) ([2a0f1f7](https://www.github.com/googleapis/nodejs-datacatalog/commit/2a0f1f7ccb62e1f6ac53acbf6eb14706228532c0)) - -### [1.6.1](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.6.0...v1.6.1) (2020-01-04) - - -### Bug Fixes - -* better close() in client ([#87](https://www.github.com/googleapis/nodejs-datacatalog/issues/87)) ([fb41332](https://www.github.com/googleapis/nodejs-datacatalog/commit/fb41332b1601f8825c0a6a91565566339471a199)) - -## [1.6.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.5.1...v1.6.0) (2020-01-02) - - -### Features - -* add support for marking a tag template field as required when creating a new tag template; add support for updating a tag template field from required to optional ([0b589b4](https://www.github.com/googleapis/nodejs-datacatalog/commit/0b589b4a18ce1d6f6a80412c4f608690f02be711)) - -### [1.5.1](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.5.0...v1.5.1) (2019-12-20) - - -### Bug Fixes - -* bring common resources back ([#75](https://www.github.com/googleapis/nodejs-datacatalog/issues/75)) ([8472def](https://www.github.com/googleapis/nodejs-datacatalog/commit/8472defdf9a2394f218f5a15d2d8e9400fc3af86)) -* fix auto-pagination field name ([1b9d24b](https://www.github.com/googleapis/nodejs-datacatalog/commit/1b9d24b281e38097df2a7886cefaa515dc89c655)) -* increase timeout from 20s to 60s ([#76](https://www.github.com/googleapis/nodejs-datacatalog/issues/76)) ([3fbcf3d](https://www.github.com/googleapis/nodejs-datacatalog/commit/3fbcf3d3fb07b9d59cbd42e78f581b74aa5bccd4)) - -## [1.5.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.4.1...v1.5.0) (2019-12-11) - - -### Features - -* make operationsClient and service stub public ([e7ca581](https://www.github.com/googleapis/nodejs-datacatalog/commit/e7ca5815340c3d9ffd4d170a1193565a76f53b15)) - -### [1.4.1](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.4.0...v1.4.1) (2019-12-05) - - -### Bug Fixes - -* **deps:** pin TypeScript below 3.7.0 ([cc671d9](https://www.github.com/googleapis/nodejs-datacatalog/commit/cc671d9ae2bfd420195df25bdaa0e4c1757008ec)) -* **docs:** adds jsdoc strings ([2834bfe](https://www.github.com/googleapis/nodejs-datacatalog/commit/2834bfe0057d9222f8c6f70e60de216560251d06)) - -## [1.4.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.3.0...v1.4.0) (2019-11-20) - -In this release the library has been converted to TypeScript. There should be no breaking changes -for existing users, but please feel free to submit an issue if you find anything wrong! - -### Features - -* new clients, convert to TypeScript ([#61](https://www.github.com/googleapis/nodejs-datacatalog/issues/61)) ([489c492](https://www.github.com/googleapis/nodejs-datacatalog/commit/489c49231c5386d7c540239c8861fdcef080679f)) - - -### Bug Fixes - -* **docs:** snippets are now replaced in jsdoc comments ([#54](https://www.github.com/googleapis/nodejs-datacatalog/issues/54)) ([4a61922](https://www.github.com/googleapis/nodejs-datacatalog/commit/4a6192275313e64f4e28fb43f6a7144807a89512)) - -## [1.3.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.2.0...v1.3.0) (2019-10-22) - - -### Features - -* updated proto annotations ([822d45d](https://www.github.com/googleapis/nodejs-datacatalog/commit/822d45d3a3eee323f0171ed2411b51ba9d9d0d7e)) - - -### Bug Fixes - -* **deps:** bump google-gax to 1.7.5 ([#50](https://www.github.com/googleapis/nodejs-datacatalog/issues/50)) ([8bc69c5](https://www.github.com/googleapis/nodejs-datacatalog/commit/8bc69c59ef8255fdb5ef9269e98d8ebc2452b75a)) - -## [1.2.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.1.0...v1.2.0) (2019-10-09) - - -### Bug Fixes - -* use compatible version of google-gax ([c854efc](https://www.github.com/googleapis/nodejs-datacatalog/commit/c854efc)) - - -### Features - -* .d.ts for protos ([26e81a4](https://www.github.com/googleapis/nodejs-datacatalog/commit/26e81a4)) -* .d.ts for protos ([#39](https://www.github.com/googleapis/nodejs-datacatalog/issues/39)) ([8090b3e](https://www.github.com/googleapis/nodejs-datacatalog/commit/8090b3e)) -* introduces new proto annotations ([9e03bc7](https://www.github.com/googleapis/nodejs-datacatalog/commit/9e03bc7)) - -## [1.1.0](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.0.2...v1.1.0) (2019-09-15) - - -### Bug Fixes - -* set proper version # for x-goog-api-client ([8d8b776](https://www.github.com/googleapis/nodejs-datacatalog/commit/8d8b776)) - - -### Features - -* load protos from JSON, grpc-fallback support ([13061f3](https://www.github.com/googleapis/nodejs-datacatalog/commit/13061f3)) - -### [1.0.2](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.0.1...v1.0.2) (2019-08-05) - - -### Bug Fixes - -* allow calls with no request, add JSON proto ([9a38026](https://www.github.com/googleapis/nodejs-datacatalog/commit/9a38026)) - -### [1.0.1](https://www.github.com/googleapis/nodejs-datacatalog/compare/v1.0.0...v1.0.1) (2019-06-26) - - -### Bug Fixes - -* **docs:** link to reference docs section on googleapis.dev ([#10](https://www.github.com/googleapis/nodejs-datacatalog/issues/10)) ([2a93e95](https://www.github.com/googleapis/nodejs-datacatalog/commit/2a93e95)) - -## 1.0.0 (2019-06-20) - - -### ⚠ BREAKING CHANGES - -* first release of client library (#8) -* remove create/delete methods for entries and entry groups (#3) - -### Bug Fixes - -* package name should be @google-cloud/datacatalog ([#2](https://www.github.com/googleapis/nodejs-datacatalog/issues/2)) ([5d3db51](https://www.github.com/googleapis/nodejs-datacatalog/commit/5d3db51)) - - -### Code Refactoring - -* remove create/delete methods for entries and entry groups ([#3](https://www.github.com/googleapis/nodejs-datacatalog/issues/3)) ([e574462](https://www.github.com/googleapis/nodejs-datacatalog/commit/e574462)) - - -### Features - -* first release of client library ([#8](https://www.github.com/googleapis/nodejs-datacatalog/issues/8)) ([8250c88](https://www.github.com/googleapis/nodejs-datacatalog/commit/8250c88)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 2add2547..46b2a08e 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,94 +1,43 @@ - -# Code of Conduct +# Contributor Code of Conduct -## Our Pledge +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of -experience, education, socio-economic status, nationality, personal appearance, -race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, or to ban temporarily or permanently any -contributor for other behaviors that they deem inappropriate, threatening, -offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -This Code of Conduct also applies outside the project spaces when the Project -Steward has a reasonable belief that an individual's behavior may have a -negative impact on the project or its community. - -## Conflict Resolution - -We do not believe that all conflict is bad; healthy debate and disagreement -often yield positive results. However, it is never okay to be disrespectful or -to engage in behavior that violates the project’s code of conduct. - -If you see someone violating the code of conduct, you are encouraged to address -the behavior directly with those involved. Many issues can be resolved quickly -and easily, and this gives people more control over the outcome of their -dispute. If you are unable to resolve the matter for any reason, or if the -behavior is threatening or harassing, report it. We are dedicated to providing -an environment where participants feel welcome and safe. - -Reports should be directed to *googleapis-stewards@google.com*, the -Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to -receive and address reported violations of the code of conduct. They will then -work with a committee consisting of representatives from the Open Source -Programs Office and the Google Open Source Strategy team. If for any reason you -are uncomfortable reaching out to the Project Steward, please email -opensource@google.com. - -We will investigate every complaint, but you may not receive a direct response. -We will use our discretion in determining when and how to follow up on reported -incidents, which may range from not taking action to permanent expulsion from -the project and project-sponsored spaces. We will notify the accused of the -report and provide them an opportunity to discuss it before any action is taken. -The identity of the reporter will be omitted from the details of the report -supplied to the accused. In potentially harmful situations, such as ongoing -harassment or threats to anyone's safety, we may take action without notice. - -## Attribution - -This Code of Conduct is adapted from the Contributor Covenant, version 1.4, -available at -https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bce6f18e..78aaa61b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,18 +34,8 @@ accept your pull requests. 1. Ensure that your code adheres to the existing style in the code to which you are contributing. 1. Ensure that your code has an appropriate set of tests which all pass. -1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. -### Before you begin - -1. [Select or create a Cloud Platform project][projects]. -1. [Enable billing for your project][billing]. -1. [Enable the Data Catalog API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the - API from your local workstation. - - ## Running the tests 1. [Prepare your environment for Node.js setup][setup]. @@ -56,21 +46,10 @@ accept your pull requests. 1. Run the tests: - # Run unit tests. npm test - # Run sample integration tests. - npm run samples-test - - # Run all system tests. - npm run system-test - 1. Lint (and maybe fix) any changes: npm run fix [setup]: https://cloud.google.com/nodejs/docs/setup -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=datacatalog.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/linkinator.config.json b/linkinator.config.json deleted file mode 100644 index 29a223b6..00000000 --- a/linkinator.config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "recurse": true, - "skip": [ - "https://codecov.io/gh/googleapis/", - "www.googleapis.com", - "img.shields.io" - ], - "silent": true, - "concurrency": 10 -} diff --git a/owlbot.py b/owlbot.py deleted file mode 100644 index 49fce7a6..00000000 --- a/owlbot.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the License); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 synthtool.languages.node as node -node.owlbot_main(templates_excludes=[ -'README.md' -]) diff --git a/package.json b/package.json deleted file mode 100644 index 79fc4d63..00000000 --- a/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "repository": "googleapis/nodejs-datacatalog", - "name": "@google-cloud/datacatalog", - "version": "3.1.1", - "author": "Google LLC", - "description": "Google Cloud Data Catalog API client for Node.js", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos", - "AUTHORS", - "COPYING" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google datacatalog", - "datacatalog", - "Google Cloud Data Catalog API" - ], - "dependencies": { - "google-gax": "^3.5.2" - }, - "devDependencies": { - "@types/mocha": "^9.0.0", - "@types/node": "^18.0.0", - "@types/sinon": "^10.0.0", - "c8": "^7.0.0", - "chai": "^4.2.0", - "gts": "^3.1.0", - "jsdoc": "^4.0.0", - "jsdoc-fresh": "^2.0.0", - "jsdoc-region-tag": "^2.0.0", - "linkinator": "^4.0.0", - "mocha": "^9.2.2", - "pack-n-play": "^1.0.0-2", - "sinon": "^14.0.0", - "typescript": "^4.6.4" - }, - "scripts": { - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "test": "c8 mocha build/test/*.js", - "predocs-test": "npm run docs", - "docs-test": "linkinator docs", - "samples-test": "cd samples/ && npm link ../ && npm test", - "system-test": "c8 mocha --timeout=5000 build/system-test/*.js", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "prepare": "npm run compile-protos && npm run compile", - "pretest": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "clean": "gts clean", - "precompile": "gts clean" - }, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } -} diff --git a/prettier.config.js b/prettier.config.js deleted file mode 100644 index a425d3f7..00000000 --- a/prettier.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - singleQuote: true, - trailingComma: 'es5', -}; diff --git a/protos/google/cloud/common_resources.proto b/protos/google/cloud/common_resources.proto deleted file mode 100644 index 56c9f800..00000000 --- a/protos/google/cloud/common_resources.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.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. - -// This file contains stub messages for common resources in GCP. -// It is not intended to be directly generated, and is instead used by -// other tooling to be able to match common resource patterns. -syntax = "proto3"; - -package google.cloud; - -import "google/api/resource.proto"; - - -option (google.api.resource_definition) = { - type: "cloudresourcemanager.googleapis.com/Project" - pattern: "projects/{project}" -}; - - -option (google.api.resource_definition) = { - type: "cloudresourcemanager.googleapis.com/Organization" - pattern: "organizations/{organization}" -}; - - -option (google.api.resource_definition) = { - type: "cloudresourcemanager.googleapis.com/Folder" - pattern: "folders/{folder}" -}; - - -option (google.api.resource_definition) = { - type: "cloudbilling.googleapis.com/BillingAccount" - pattern: "billingAccounts/{billing_account}" -}; - -option (google.api.resource_definition) = { - type: "locations.googleapis.com/Location" - pattern: "projects/{project}/locations/{location}" -}; - diff --git a/protos/google/cloud/datacatalog/v1/bigquery.proto b/protos/google/cloud/datacatalog/v1/bigquery.proto deleted file mode 100644 index 4be42ebb..00000000 --- a/protos/google/cloud/datacatalog/v1/bigquery.proto +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/api/field_behavior.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "BigQueryProto"; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Specification for the BigQuery connection. -message BigQueryConnectionSpec { - // The type of the BigQuery connection. - enum ConnectionType { - // Unspecified type. - CONNECTION_TYPE_UNSPECIFIED = 0; - - // Cloud SQL connection. - CLOUD_SQL = 1; - } - - // The type of the BigQuery connection. - ConnectionType connection_type = 1; - - oneof connection_spec { - // Specification for the BigQuery connection to a Cloud SQL instance. - CloudSqlBigQueryConnectionSpec cloud_sql = 2; - } - - // True if there are credentials attached to the BigQuery connection; false - // otherwise. - bool has_credential = 3; -} - -// Specification for the BigQuery connection to a Cloud SQL instance. -message CloudSqlBigQueryConnectionSpec { - // Supported Cloud SQL database types. - enum DatabaseType { - // Unspecified database type. - DATABASE_TYPE_UNSPECIFIED = 0; - - // Cloud SQL for PostgreSQL. - POSTGRES = 1; - - // Cloud SQL for MySQL. - MYSQL = 2; - } - - // Cloud SQL instance ID in the format of `project:location:instance`. - string instance_id = 1; - - // Database name. - string database = 2; - - // Type of the Cloud SQL database. - DatabaseType type = 3; -} - -// Fields specific for BigQuery routines. -message BigQueryRoutineSpec { - // Paths of the imported libraries. - repeated string imported_libraries = 1; -} diff --git a/protos/google/cloud/datacatalog/v1/common.proto b/protos/google/cloud/datacatalog/v1/common.proto deleted file mode 100644 index 7a6bef5f..00000000 --- a/protos/google/cloud/datacatalog/v1/common.proto +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Entry metadata relevant only to the user and private to them. -message PersonalDetails { - // True if the entry is starred by the user; false otherwise. - bool starred = 1; - - // Set if the entry is starred; unset otherwise. - google.protobuf.Timestamp star_time = 2; -} - -// This enum lists all the systems that Data Catalog integrates with. -enum IntegratedSystem { - // Default unknown system. - INTEGRATED_SYSTEM_UNSPECIFIED = 0; - - // BigQuery. - BIGQUERY = 1; - - // Cloud Pub/Sub. - CLOUD_PUBSUB = 2; - - // Dataproc Metastore. - DATAPROC_METASTORE = 3; - - // Dataplex. - DATAPLEX = 4; -} diff --git a/protos/google/cloud/datacatalog/v1/data_source.proto b/protos/google/cloud/datacatalog/v1/data_source.proto deleted file mode 100644 index a73ff09c..00000000 --- a/protos/google/cloud/datacatalog/v1/data_source.proto +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/api/field_behavior.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "DataSourceProto"; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Physical location of an entry. -message DataSource { - // Name of a service that stores the data. - enum Service { - // Default unknown service. - SERVICE_UNSPECIFIED = 0; - - // Google Cloud Storage service. - CLOUD_STORAGE = 1; - - // BigQuery service. - BIGQUERY = 2; - } - - // Service that physically stores the data. - Service service = 1; - - // Full name of a resource as defined by the service. For example: - // - // `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - string resource = 2; - - // Output only. Data Catalog entry name, if applicable. - string source_entry = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - oneof properties { - // Detailed properties of the underlying storage. - StorageProperties storage_properties = 4; - } -} - -// Details the properties of the underlying storage. -message StorageProperties { - // Patterns to identify a set of files for this fileset. - // - // Examples of a valid `file_pattern`: - // - // * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir` - // directory - // * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir` - // and all subdirectories recursively - // * `gs://bucket_name/file*`: matches files prefixed by `file` in - // `bucket_name` - // * `gs://bucket_name/??.txt`: matches files with two characters followed by - // `.txt` in `bucket_name` - // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - // vowel character followed by `.txt` in - // `bucket_name` - // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - // or `m` followed by `.txt` in `bucket_name` - // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - // the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - repeated string file_pattern = 1; - - // File type in MIME format, for example, `text/plain`. - string file_type = 2; -} diff --git a/protos/google/cloud/datacatalog/v1/datacatalog.proto b/protos/google/cloud/datacatalog/v1/datacatalog.proto deleted file mode 100644 index 4508e076..00000000 --- a/protos/google/cloud/datacatalog/v1/datacatalog.proto +++ /dev/null @@ -1,1710 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.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/datacatalog/v1/bigquery.proto"; -import "google/cloud/datacatalog/v1/common.proto"; -import "google/cloud/datacatalog/v1/data_source.proto"; -import "google/cloud/datacatalog/v1/dataplex_spec.proto"; -import "google/cloud/datacatalog/v1/gcs_fileset_spec.proto"; -import "google/cloud/datacatalog/v1/schema.proto"; -import "google/cloud/datacatalog/v1/search.proto"; -import "google/cloud/datacatalog/v1/table_spec.proto"; -import "google/cloud/datacatalog/v1/tags.proto"; -import "google/cloud/datacatalog/v1/timestamps.proto"; -import "google/cloud/datacatalog/v1/usage.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; -option (google.api.resource_definition) = { - type: "datacatalog.googleapis.com/TagTemplateFieldEnumValue" - pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}" -}; - -// Data Catalog API service allows you to discover, understand, and manage -// your data. -service DataCatalog { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Searches Data Catalog for multiple resources like entries and tags that - // match a query. - // - // This is a [Custom Method] - // (https://cloud.google.com/apis/design/custom_methods) that doesn't return - // all information on a resource, only its ID and high level fields. To get - // more information, you can subsequently call specific get methods. - // - // Note: Data Catalog search queries don't guarantee full recall. Results - // that match your query might not be returned, even in subsequent - // result pages. Additionally, returned (and not returned) results can vary - // if you repeat search queries. - // - // For more information, see [Data Catalog search syntax] - // (https://cloud.google.com/data-catalog/docs/how-to/search-reference). - rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { - option (google.api.http) = { - post: "/v1/catalog:search" - body: "*" - }; - option (google.api.method_signature) = "scope,query"; - } - - // Creates an entry group. - // - // An entry group contains logically related entries together with [Cloud - // Identity and Access Management](/data-catalog/docs/concepts/iam) policies. - // These policies specify users who can create, edit, and view entries - // within entry groups. - // - // Data Catalog automatically creates entry groups with names that start with - // the `@` symbol for the following resources: - // - // * BigQuery entries (`@bigquery`) - // * Pub/Sub topics (`@pubsub`) - // * Dataproc Metastore services (`@dataproc_metastore_{SERVICE_NAME_HASH}`) - // - // You can create your own entry groups for Cloud Storage fileset entries - // and custom entries together with the corresponding IAM policies. - // User-created entry groups can't contain the `@` symbol, it is reserved - // for automatically created groups. - // - // Entry groups, like entries, can be searched. - // - // A maximum of 10,000 entry groups may be created per organization across all - // locations. - // - // You must enable the Data Catalog API in the project identified by - // the `parent` parameter. For more information, see [Data Catalog resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/entryGroups" - body: "entry_group" - }; - option (google.api.method_signature) = "parent,entry_group_id,entry_group"; - } - - // Gets an entry group. - rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.api.method_signature) = "name,read_mask"; - } - - // Updates an entry group. - // - // You must enable the Data Catalog API in the project identified by - // the `entry_group.name` parameter. For more information, see [Data Catalog - // resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - patch: "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}" - body: "entry_group" - }; - option (google.api.method_signature) = "entry_group"; - option (google.api.method_signature) = "entry_group,update_mask"; - } - - // Deletes an entry group. - // - // You must enable the Data Catalog API in the project - // identified by the `name` parameter. For more information, see [Data Catalog - // resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists entry groups. - rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/entryGroups" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates an entry. - // - // You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM', - // or custom types. Data Catalog automatically creates entries with other - // types during metadata ingestion from integrated systems. - // - // You must enable the Data Catalog API in the project identified by - // the `parent` parameter. For more information, see [Data Catalog resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - // - // An entry group can have a maximum of 100,000 entries. - rpc CreateEntry(CreateEntryRequest) returns (Entry) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" - body: "entry" - }; - option (google.api.method_signature) = "parent,entry_id,entry"; - } - - // Updates an existing entry. - // - // You must enable the Data Catalog API in the project identified by - // the `entry.name` parameter. For more information, see [Data Catalog - // resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { - option (google.api.http) = { - patch: "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" - body: "entry" - }; - option (google.api.method_signature) = "entry"; - option (google.api.method_signature) = "entry,update_mask"; - } - - // Deletes an existing entry. - // - // You can delete only the entries created by the - // [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] - // method. - // - // You must enable the Data Catalog API in the project identified by - // the `name` parameter. For more information, see [Data Catalog - // resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets an entry. - rpc GetEntry(GetEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets an entry by its target resource name. - // - // The resource name comes from the source Google Cloud Platform service. - rpc LookupEntry(LookupEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1/entries:lookup" - }; - } - - // Lists entries. - // - // Note: Currently, this method can list only custom entries. - // To get a list of both custom and automatically created entries, use - // [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. - rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" - }; - option (google.api.method_signature) = "parent"; - } - - // Modifies entry overview, part of the business context of an - // [Entry][google.cloud.datacatalog.v1.Entry]. - // - // To call this method, you must have the `datacatalog.entries.updateOverview` - // IAM permission on the corresponding project. - rpc ModifyEntryOverview(ModifyEntryOverviewRequest) returns (EntryOverview) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryOverview" - body: "*" - }; - } - - // Modifies contacts, part of the business context of an - // [Entry][google.cloud.datacatalog.v1.Entry]. - // - // To call this method, you must have the `datacatalog.entries.updateContacts` - // IAM permission on the corresponding project. - rpc ModifyEntryContacts(ModifyEntryContactsRequest) returns (Contacts) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryContacts" - body: "*" - }; - } - - // Creates a tag template. - // - // You must enable the Data Catalog API in the project identified by the - // `parent` parameter. - // For more information, see [Data Catalog resource project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/tagTemplates" - body: "tag_template" - }; - option (google.api.method_signature) = "parent,tag_template_id,tag_template"; - } - - // Gets a tag template. - rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/tagTemplates/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a tag template. - // - // You can't update template fields with this method. These fields are - // separate resources with their own create, update, and delete methods. - // - // You must enable the Data Catalog API in the project identified by - // the `tag_template.name` parameter. For more information, see [Data Catalog - // resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - patch: "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" - body: "tag_template" - }; - option (google.api.method_signature) = "tag_template"; - option (google.api.method_signature) = "tag_template,update_mask"; - } - - // Deletes a tag template and all tags that use it. - // - // You must enable the Data Catalog API in the project identified by - // the `name` parameter. For more information, see [Data Catalog resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/tagTemplates/*}" - }; - option (google.api.method_signature) = "name,force"; - } - - // Creates a field in a tag template. - // - // You must enable the Data Catalog API in the project identified by - // the `parent` parameter. For more information, see [Data Catalog resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields" - body: "tag_template_field" - }; - option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field"; - } - - // Updates a field in a tag template. - // - // You can't update the field type with this method. - // - // You must enable the Data Catalog API in the project - // identified by the `name` parameter. For more information, see [Data Catalog - // resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - body: "tag_template_field" - }; - option (google.api.method_signature) = "name,tag_template_field"; - option (google.api.method_signature) = "name,tag_template_field,update_mask"; - } - - // Renames a field in a tag template. - // - // You must enable the Data Catalog API in the project identified by the - // `name` parameter. For more information, see [Data Catalog resource project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" - body: "*" - }; - option (google.api.method_signature) = "name,new_tag_template_field_id"; - } - - // Renames an enum value in a tag template. - // - // Within a single enum field, enum values must be unique. - rpc RenameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest) returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename" - body: "*" - }; - option (google.api.method_signature) = "name,new_enum_value_display_name"; - } - - // Deletes a field in a tag template and all uses of this field from the tags - // based on this template. - // - // You must enable the Data Catalog API in the project identified by - // the `name` parameter. For more information, see [Data Catalog resource - // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - }; - option (google.api.method_signature) = "name,force"; - } - - // Creates a tag and assigns it to: - // - // * An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is - // `projects.locations.entryGroups.entries.tags.create`. - // * Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method - // name is `projects.locations.entryGroups.tags.create`. - // - // Note: The project identified by the `parent` parameter for the [tag] - // (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) - // and the [tag template] - // (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) - // used to create the tag must be in the same organization. - rpc CreateTag(CreateTagRequest) returns (Tag) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" - body: "tag" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" - body: "tag" - } - }; - option (google.api.method_signature) = "parent,tag"; - } - - // Updates an existing tag. - rpc UpdateTag(UpdateTagRequest) returns (Tag) { - option (google.api.http) = { - patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" - body: "tag" - additional_bindings { - patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}" - body: "tag" - } - }; - option (google.api.method_signature) = "tag"; - option (google.api.method_signature) = "tag,update_mask"; - } - - // Deletes a tag. - rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. - // The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are - // lowercased. - rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" - additional_bindings { - get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by - // the current user. Starring information is private to each user. - rpc StarEntry(StarEntryRequest) returns (StarEntryResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:star" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by - // the current user. Starring information is private to each user. - rpc UnstarEntry(UnstarEntryRequest) returns (UnstarEntryResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:unstar" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Sets an access control policy for a resource. Replaces any existing - // policy. - // - // Supported resources are: - // - // - Tag templates - // - Entry groups - // - // Note: This method sets policies only within Data Catalog and can't be - // used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any - // external Google Cloud Platform resources synced with the Data Catalog. - // - // To call this method, you must have the following Google IAM permissions: - // - // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag - // templates. - // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy" - body: "*" - } - }; - option (google.api.method_signature) = "resource,policy"; - } - - // Gets the access control policy for a resource. - // - // May return: - // - // * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - // permission to view it. - // * An empty policy if the resource exists but doesn't have a set policy. - // - // Supported resources are: - // - // - Tag templates - // - Entry groups - // - // Note: This method doesn't get policies from Google Cloud Platform - // resources ingested into Data Catalog. - // - // To call this method, you must have the following Google IAM permissions: - // - // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag - // templates. - // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy" - body: "*" - } - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy" - body: "*" - } - }; - option (google.api.method_signature) = "resource"; - } - - // Gets your permissions on a resource. - // - // Returns an empty set of permissions if the resource doesn't exist. - // - // Supported resources are: - // - // - Tag templates - // - Entry groups - // - // Note: This method gets policies only within Data Catalog and can't be - // used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any - // external Google Cloud Platform resources ingested into Data Catalog. - // - // No Google IAM permissions are required to call this method. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions" - body: "*" - } - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions" - body: "*" - } - }; - } -} - -// Request message for -// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. -message SearchCatalogRequest { - // The criteria that select the subspace used for query matching. - message Scope { - // The list of organization IDs to search within. - // - // To find your organization ID, follow the steps from - // [Creating and managing organizations] - // (/resource-manager/docs/creating-managing-organization). - repeated string include_org_ids = 2; - - // The list of project IDs to search within. - // - // For more information on the distinction between project names, IDs, and - // numbers, see [Projects](/docs/overview/#projects). - repeated string include_project_ids = 3; - - // If `true`, include Google Cloud Platform (GCP) public datasets in - // search results. By default, they are excluded. - // - // See [Google Cloud Public Datasets](/public-datasets) for more - // information. - bool include_gcp_public_datasets = 7; - - // Optional. The list of locations to search within. If empty, all locations are - // searched. - // - // Returns an error if any location in the list isn't one of the [Supported - // regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). - // - // If a location is unreachable, its name is returned in the - // `SearchCatalogResponse.unreachable` field. To get additional information - // on the error, repeat the search request and set the location name as the - // value of this parameter. - repeated string restricted_locations = 16 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If `true`, search only among starred entries. - // - // By default, all results are returned, starred or not. - bool starred_only = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This field is deprecated. The search mechanism for public and private tag - // templates is the same. - bool include_public_tag_templates = 19 [ - deprecated = true, - (google.api.field_behavior) = OPTIONAL - ]; - } - - // Required. The scope of this search request. - // - // The `scope` is invalid if `include_org_ids`, `include_project_ids` are - // empty AND `include_gcp_public_datasets` is set to `false`. In this case, - // the request returns an error. - Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The query string with a minimum of 3 characters and specific syntax. - // For more information, see - // [Data Catalog search - // syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - // - // An empty query string returns all data assets (in the specified scope) - // that you have access to. - // - // A query string can be a simple `xyz` or qualified by predicates: - // - // * `name:x` - // * `column:y` - // * `description:z` - string query = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Number of results to return in a single search page. - // - // Can't be negative or 0, defaults to 10 in this case. - // The maximum number is 1000. If exceeded, throws an "invalid argument" - // exception. - int32 page_size = 2; - - // Optional. Pagination token that, if specified, returns the next page of search - // results. If empty, returns the first page. - // - // This token is returned in the [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] - // field of the response to a previous - // [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] - // call. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Specifies the order of results. - // - // Currently supported case-sensitive values are: - // - // * `relevance` that can only be descending - // * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default - // * `default` that can only be descending - // - // If this parameter is omitted, it defaults to the descending `relevance`. - string order_by = 5; -} - -// Response message for -// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. -message SearchCatalogResponse { - // Search results. - repeated SearchCatalogResult results = 1; - - // Pagination token that can be used in subsequent calls to retrieve the next - // page of results. - string next_page_token = 3; - - // Unreachable locations. Search results don't include data from those - // locations. - // - // To get additional information on an error, repeat the search request and - // restrict it to specific locations by setting the - // `SearchCatalogRequest.scope.restricted_locations` parameter. - repeated string unreachable = 6; -} - -// Request message for -// [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup]. -message CreateEntryGroupRequest { - // Required. The names of the project and location that the new entry group belongs to. - // - // Note: The entry group itself and its child resources might not be - // stored in the location specified in its name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Required. The ID of the entry group to create. - // - // The ID must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and must start with a letter or underscore. - // The maximum size is 64 bytes when encoded in UTF-8. - string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // The entry group to create. Defaults to empty. - EntryGroup entry_group = 2; -} - -// Request message for -// [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup]. -message UpdateEntryGroupRequest { - // Required. Updates for the entry group. The `name` field must be set. - EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; - - // Names of fields whose values to overwrite on an entry group. - // - // If this parameter is absent or empty, all modifiable fields - // are overwritten. If such fields are non-required and omitted in the - // request body, their values are emptied. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup]. -message GetEntryGroupRequest { - // Required. The name of the entry group to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // The fields to return. If empty or omitted, all fields are returned. - google.protobuf.FieldMask read_mask = 2; -} - -// Request message for -// [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup]. -message DeleteEntryGroupRequest { - // Required. The name of the entry group to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Optional. If true, deletes all entries in the entry group. - bool force = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. -message ListEntryGroupsRequest { - // Required. The name of the location that contains the entry groups to list. - // - // Can be provided as a URL. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Optional. The maximum number of items to return. - // - // Default is 10. Maximum limit is 1000. - // Throws an invalid argument if `page_size` is greater than 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Pagination token that specifies the next page to return. - // If empty, returns the first page. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. -message ListEntryGroupsResponse { - // Entry group details. - repeated EntryGroup entry_groups = 1; - - // Pagination token to specify in the next call to retrieve the next page of - // results. Empty if there are no more items. - string next_page_token = 2; -} - -// Request message for -// [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]. -message CreateEntryRequest { - // Required. The name of the entry group this entry belongs to. - // - // Note: The entry itself and its child resources might not be stored in - // the location specified in its name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Required. The ID of the entry to create. - // - // The ID must contain only letters (a-z, A-Z), numbers (0-9), - // and underscores (_). - // The maximum size is 64 bytes when encoded in UTF-8. - string entry_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The entry to create. - Entry entry = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry]. -message UpdateEntryRequest { - // Required. Updates for the entry. The `name` field must be set. - Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; - - // Names of fields whose values to overwrite on an entry. - // - // If this parameter is absent or empty, all modifiable fields - // are overwritten. If such fields are non-required and omitted in the - // request body, their values are emptied. - // - // You can modify only the fields listed below. - // - // For entries with type `DATA_STREAM`: - // - // * `schema` - // - // For entries with type `FILESET`: - // - // * `schema` - // * `display_name` - // * `description` - // * `gcs_fileset_spec` - // * `gcs_fileset_spec.file_patterns` - // - // For entries with `user_specified_type`: - // - // * `schema` - // * `display_name` - // * `description` - // * `user_specified_type` - // * `user_specified_system` - // * `linked_resource` - // * `source_system_timestamps` - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry]. -message DeleteEntryRequest { - // Required. The name of the entry to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Request message for -// [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry]. -message GetEntryRequest { - // Required. The name of the entry to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Request message for -// [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry]. -message LookupEntryRequest { - // Required. A full name, SQL name, or a fully qualified name of a - // Google Cloud Platform resource. - oneof target_name { - // The full name of the Google Cloud Platform resource the Data Catalog - // entry represents. For more information, see [Full Resource Name] - // (https://cloud.google.com/apis/design/resource_names#full_resource_name). - // - // Full names are case-sensitive. For example: - // - // * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - // * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` - string linked_resource = 1; - - // The SQL name of the entry. SQL names are case-sensitive. - // - // Examples: - // - // * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` - // * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` - // * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` - // * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` - // * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` - // - // Identifiers (`*_ID`) should comply with the - // [Lexical structure in Standard SQL] - // (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). - string sql_resource = 3; - - // Fully qualified name (FQN) of the resource. - // - // FQNs take two forms: - // - // * For non-regionalized resources: - // - // `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - // - // * For regionalized resources: - // - // `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - // - // Example for a DPMS table: - // - // `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` - string fully_qualified_name = 5; - } -} - -// Entry metadata. -// A Data Catalog entry represents another resource in Google -// Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or -// outside of it. You can use the `linked_resource` field -// in the entry resource to refer to the original resource ID of the source -// system. -// -// An entry resource contains resource details, for example, its schema. -// Additionally, you can attach flexible metadata to an entry in the form of a -// [Tag][google.cloud.datacatalog.v1.Tag]. -message Entry { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Entry" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" - }; - - // Output only. The resource name of an entry in URL format. - // - // Note: The entry itself and its child resources might not be - // stored in the location specified in its name. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // The resource this metadata entry refers to. - // - // For Google Cloud Platform resources, `linked_resource` is the - // [Full Resource Name] - // (https://cloud.google.com/apis/design/resource_names#full_resource_name). - // For example, the `linked_resource` for a table resource from BigQuery is: - // - // `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - // - // Output only when the entry is one of the types in the `EntryType` enum. - // - // For entries with a `user_specified_type`, this field is optional and - // defaults to an empty string. - // - // The resource string must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), periods (.), colons (:), slashes (/), dashes (-), - // and hashes (#). - // The maximum size is 200 bytes when encoded in UTF-8. - string linked_resource = 9; - - // Fully qualified name (FQN) of the resource. Set automatically for entries - // representing resources from synced systems. Settable only during creation - // and read-only afterwards. Can be used for search and lookup of the entries. - // - // - // - // FQNs take two forms: - // - // * For non-regionalized resources: - // - // `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - // - // * For regionalized resources: - // - // `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - // - // Example for a DPMS table: - // - // `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` - string fully_qualified_name = 29; - - // Required. Entry type. - oneof entry_type { - // The type of the entry. - // Only used for entries with types listed in the `EntryType` enum. - // - // Currently, only `FILESET` enum value is allowed. All other entries - // created in Data Catalog must use the `user_specified_type`. - EntryType type = 2; - - // Custom entry type that doesn't match any of the values allowed for input - // and listed in the `EntryType` enum. - // - // When creating an entry, first check the type values in the enum. - // If there are no appropriate types for the new entry, - // provide a custom value, for example, `my_special_type`. - // - // The `user_specified_type` string has the following limitations: - // - // * Is case insensitive. - // * Must begin with a letter or underscore. - // * Can only contain letters, numbers, and underscores. - // * Must be at least 1 character and at most 64 characters long. - string user_specified_type = 16; - } - - // The source system of the entry. - oneof system { - // Output only. Indicates the entry's source system that Data Catalog - // integrates with, such as BigQuery, Pub/Sub, or Dataproc Metastore. - IntegratedSystem integrated_system = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Indicates the entry's source system that Data Catalog doesn't - // automatically integrate with. - // - // The `user_specified_system` string has the following limitations: - // - // * Is case insensitive. - // * Must begin with a letter or underscore. - // * Can only contain letters, numbers, and underscores. - // * Must be at least 1 character and at most 64 characters long. - string user_specified_system = 18; - } - - // Type specification. - oneof type_spec { - // Specification that applies to a Cloud Storage fileset. Valid only - // for entries with the `FILESET` type. - GcsFilesetSpec gcs_fileset_spec = 6; - - // Output only. Specification that applies to a BigQuery table. Valid only - // for entries with the `TABLE` type. - BigQueryTableSpec bigquery_table_spec = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Specification for a group of BigQuery tables with - // the `[prefix]YYYYMMDD` name pattern. - // - // For more information, see [Introduction to partitioned tables] - // (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding). - BigQueryDateShardedSpec bigquery_date_sharded_spec = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Type- and system-specific information. Specifications for types contain - // fields common to all entries of a given type, and sub-specifications with - // fields specific to a given source system. - // - // When extending the API with new types and systems, use this field instead - // of the legacy `type_spec`. - oneof spec { - // Specification that applies to a table resource. Valid only - // for entries with the `TABLE` type. - DatabaseTableSpec database_table_spec = 24; - - // Specification that applies to a data source connection. Valid only - // for entries with the `DATA_SOURCE_CONNECTION` type. - DataSourceConnectionSpec data_source_connection_spec = 27; - - // Specification that applies to a user-defined function or procedure. Valid - // only for entries with the `ROUTINE` type. - RoutineSpec routine_spec = 28; - - // Specification that applies to a fileset resource. Valid only - // for entries with the `FILESET` type. - FilesetSpec fileset_spec = 33; - } - - // Display name of an entry. - // - // The name must contain only Unicode letters, numbers (0-9), underscores (_), - // dashes (-), spaces ( ), and can't start or end with spaces. - // The maximum size is 200 bytes when encoded in UTF-8. - // Default value is an empty string. - string display_name = 3; - - // Entry description that can consist of several sentences or paragraphs - // that describe entry contents. - // - // The description must not contain Unicode non-characters as well as C0 - // and C1 control codes except tabs (HT), new lines (LF), carriage returns - // (CR), and page breaks (FF). - // The maximum size is 2000 bytes when encoded in UTF-8. - // Default value is an empty string. - string description = 4; - - // Business Context of the entry. Not supported for BigQuery datasets - BusinessContext business_context = 37; - - // Schema of the entry. An entry might not have any schema attached to it. - Schema schema = 5; - - // Timestamps from the underlying resource, not from the Data Catalog - // entry. - // - // Output only when the entry has a system listed in the `IntegratedSystem` - // enum. For entries with `user_specified_system`, this field is optional - // and defaults to an empty timestamp. - SystemTimestamps source_system_timestamps = 7; - - // Resource usage statistics. - UsageSignal usage_signal = 13; - - // Cloud labels attached to the entry. - // - // In Data Catalog, you can create and modify labels attached only to custom - // entries. Synced entries have unmodifiable labels that come from the source - // system. - map labels = 14; - - // Output only. Physical location of the entry. - DataSource data_source = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional information related to the entry. Private to the current user. - PersonalDetails personal_details = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specification that applies to a table resource. Valid only -// for entries with the `TABLE` type. -message DatabaseTableSpec { - // Type of the table. - enum TableType { - // Default unknown table type. - TABLE_TYPE_UNSPECIFIED = 0; - - // Native table. - NATIVE = 1; - - // External table. - EXTERNAL = 2; - } - - // Type of this table. - TableType type = 1; - - // Output only. Fields specific to a Dataplex table and present only in the - // Dataplex table entries. - DataplexTableSpec dataplex_table = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specification that applies to a fileset. Valid only for entries with the -// 'FILESET' type. -message FilesetSpec { - // Fields specific to a Dataplex fileset and present only in the Dataplex - // fileset entries. - DataplexFilesetSpec dataplex_fileset = 1; -} - -// Specification that applies to a data source connection. Valid only for -// entries with the `DATA_SOURCE_CONNECTION` type. -// Only one of internal specs can be set at the time, and cannot -// be changed later. -message DataSourceConnectionSpec { - // Output only. Fields specific to BigQuery connections. - BigQueryConnectionSpec bigquery_connection_spec = 1; -} - -// Specification that applies to a routine. Valid only for -// entries with the `ROUTINE` type. -message RoutineSpec { - // The fine-grained type of the routine. - enum RoutineType { - // Unspecified type. - ROUTINE_TYPE_UNSPECIFIED = 0; - - // Non-builtin permanent scalar function. - SCALAR_FUNCTION = 1; - - // Stored procedure. - PROCEDURE = 2; - } - - // Input or output argument of a function or stored procedure. - message Argument { - // The input or output mode of the argument. - enum Mode { - // Unspecified mode. - MODE_UNSPECIFIED = 0; - - // The argument is input-only. - IN = 1; - - // The argument is output-only. - OUT = 2; - - // The argument is both an input and an output. - INOUT = 3; - } - - // The name of the argument. A return argument of a function might not have - // a name. - string name = 1; - - // Specifies whether the argument is input or output. - Mode mode = 2; - - // Type of the argument. The exact value depends on the source system and - // the language. - string type = 3; - } - - // The type of the routine. - RoutineType routine_type = 1; - - // The language the routine is written in. The exact value depends on the - // source system. For BigQuery routines, possible values are: - // - // * `SQL` - // * `JAVASCRIPT` - string language = 2; - - // Arguments of the routine. - repeated Argument routine_arguments = 3; - - // Return type of the argument. The exact value depends on the source system - // and the language. - string return_type = 4; - - // The body of the routine. - string definition_body = 5; - - // Contains fields specific to the source system. - oneof system_spec { - // Fields specific for BigQuery routines. - BigQueryRoutineSpec bigquery_routine_spec = 6; - } -} - -// Business Context of the entry. -message BusinessContext { - // Entry overview fields for rich text descriptions of entries. - EntryOverview entry_overview = 1; - - // Contact people for the entry. - Contacts contacts = 2; -} - -// Entry overview fields for rich text descriptions of entries. -message EntryOverview { - // Entry overview with support for rich text. - // - // The overview must only contain Unicode characters, and should be - // formatted using HTML. - // The maximum length is 10 MiB as this value holds HTML descriptions - // including encoded images. The maximum length of the text without images - // is 100 KiB. - string overview = 1; -} - -// Contact people for the entry. -message Contacts { - // A contact person for the entry. - message Person { - // Designation of the person, for example, Data Steward. - string designation = 1; - - // Email of the person in the format of `john.doe@xyz`, - // ``, or `John Doe`. - string email = 2; - } - - // The list of contact people for the entry. - repeated Person people = 1; -} - -// Entry group metadata. -// -// An `EntryGroup` resource represents a logical grouping of zero or more -// Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources. -message EntryGroup { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/EntryGroup" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" - }; - - // The resource name of the entry group in URL format. - // - // Note: The entry group itself and its child resources might not be - // stored in the location specified in its name. - string name = 1; - - // A short name to identify the entry group, for example, - // "analytics data - jan 2011". Default value is an empty string. - string display_name = 2; - - // Entry group description. Can consist of several sentences or - // paragraphs that describe the entry group contents. - // Default value is an empty string. - string description = 3; - - // Output only. Timestamps of the entry group. Default value is empty. - SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate]. -message CreateTagTemplateRequest { - // Required. The name of the project and the template location - // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. The ID of the tag template to create. - // - // The ID must contain only lowercase letters (a-z), numbers (0-9), - // or underscores (_), and must start with a letter or underscore. - // The maximum size is 64 bytes when encoded in UTF-8. - string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The tag template to create. - TagTemplate tag_template = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate]. -message GetTagTemplateRequest { - // Required. The name of the tag template to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; -} - -// Request message for -// [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate]. -message UpdateTagTemplateRequest { - // Required. The template to update. The `name` field must be set. - TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED]; - - // Names of fields whose values to overwrite on a tag template. Currently, - // only `display_name` and `is_publicly_readable` can be overwritten. - // - // If this parameter is absent or empty, all modifiable fields - // are overwritten. If such fields are non-required and omitted in the - // request body, their values are emptied. - // - // Note: Updating the `is_publicly_readable` field may require up to 12 - // hours to take effect in search results. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate]. -message DeleteTagTemplateRequest { - // Required. The name of the tag template to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. If true, deletes all tags that use this template. - // - // Currently, `true` is the only supported value. - bool force = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag]. -message CreateTagRequest { - // Required. The name of the resource to attach this tag to. - // - // Tags can be attached to entries or entry groups. An entry can have up to - // 1000 attached tags. - // - // Note: The tag and its child resources might not be stored in - // the location specified in its name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; - - // Required. The tag to create. - Tag tag = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag]. -message UpdateTagRequest { - // Required. The updated tag. The "name" field must be set. - Tag tag = 1 [(google.api.field_behavior) = REQUIRED]; - - // Names of fields whose values to overwrite on a tag. Currently, a tag has - // the only modifiable field with the name `fields`. - // - // In general, if this parameter is absent or empty, all modifiable fields - // are overwritten. If such fields are non-required and omitted in the - // request body, their values are emptied. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag]. -message DeleteTagRequest { - // Required. The name of the tag to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; -} - -// Request message for -// [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField]. -message CreateTagTemplateFieldRequest { - // Required. The name of the project and the template location - // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. The ID of the tag template field to create. - // - // Note: Adding a required field to an existing template is *not* allowed. - // - // Field IDs can contain letters (both uppercase and lowercase), numbers - // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - // character long and at most 128 characters long. Field IDs must also be - // unique within their template. - string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The tag template field to create. - TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField]. -message UpdateTagTemplateFieldRequest { - // Required. The name of the tag template field. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. The template to update. - TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Names of fields whose values to overwrite on an individual field of a tag - // template. The following fields are modifiable: - // - // * `display_name` - // * `type.enum_type` - // * `is_required` - // - // If this parameter is absent or empty, all modifiable fields - // are overwritten. If such fields are non-required and omitted in the request - // body, their values are emptied with one exception: when updating an enum - // type, the provided values are merged with the existing values. Therefore, - // enum values can only be added, existing enum values cannot be deleted or - // renamed. - // - // Additionally, updating a template field from optional to required is - // *not* allowed. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField]. -message RenameTagTemplateFieldRequest { - // Required. The name of the tag template field. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. The new ID of this tag template field. For example, `my_new_field`. - string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue]. -message RenameTagTemplateFieldEnumValueRequest { - // Required. The name of the enum field value. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateFieldEnumValue" - } - ]; - - // Required. The new display name of the enum value. For example, `my_new_enum_value`. - string new_enum_value_display_name = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField]. -message DeleteTagTemplateFieldRequest { - // Required. The name of the tag template field to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. If true, deletes this field from any tags that use it. - // - // Currently, `true` is the only supported value. - bool force = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. -message ListTagsRequest { - // Required. The name of the Data Catalog resource to list the tags of. - // - // The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] - // or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] - // (without `/entries/{entries}` at the end). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; - - // The maximum number of tags to return. Default is 10. Maximum limit is 1000. - int32 page_size = 2; - - // Pagination token that specifies the next page to return. If empty, the - // first page is returned. - string page_token = 3; -} - -// Response message for -// [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. -message ListTagsResponse { - // [Tag][google.cloud.datacatalog.v1.Tag] details. - repeated Tag tags = 1; - - // Pagination token of the next results page. Empty if there are - // no more items in results. - string next_page_token = 2; -} - -// Request message for -// [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. -message ListEntriesRequest { - // Required. The name of the entry group that contains the entries to list. - // - // Can be provided in URL format. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // The maximum number of items to return. Default is 10. Maximum limit is - // 1000. Throws an invalid argument if `page_size` is more than 1000. - int32 page_size = 2; - - // Pagination token that specifies the next page to return. If empty, the - // first page is returned. - string page_token = 3; - - // The fields to return for each entry. If empty or omitted, all - // fields are returned. - // - // For example, to return a list of entries with only the `name` field, - // set `read_mask` to only one path with the `name` value. - google.protobuf.FieldMask read_mask = 4; -} - -// Response message for -// [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. -message ListEntriesResponse { - // Entry details. - repeated Entry entries = 1; - - // Pagination token of the next results page. Empty if there are no more items - // in results. - string next_page_token = 2; -} - -// Request message for -// [StarEntry][google.cloud.datacatalog.v1.DataCatalog.StarEntry]. -message StarEntryRequest { - // Required. The name of the entry to mark as starred. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Response message for -// [StarEntry][google.cloud.datacatalog.v1.DataCatalog.StarEntry]. -// Empty for now -message StarEntryResponse { - -} - -// Request message for -// [UnstarEntry][google.cloud.datacatalog.v1.DataCatalog.UnstarEntry]. -message UnstarEntryRequest { - // Required. The name of the entry to mark as **not** starred. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Response message for -// [UnstarEntry][google.cloud.datacatalog.v1.DataCatalog.UnstarEntry]. -// Empty for now -message UnstarEntryResponse { - -} - -// Request message for -// [ModifyEntryOverview][google.cloud.datacatalog.v1.DataCatalog.ModifyEntryOverview]. -message ModifyEntryOverviewRequest { - // Required. The full resource name of the entry. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; - - // Required. The new value for the Entry Overview. - EntryOverview entry_overview = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [ModifyEntryContacts][google.cloud.datacatalog.v1.DataCatalog.ModifyEntryContacts]. -message ModifyEntryContactsRequest { - // Required. The full resource name of the entry. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; - - // Required. The new value for the Contacts. - Contacts contacts = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The enum field that lists all the types of entry resources in Data -// Catalog. For example, a BigQuery table entry has the `TABLE` type. -enum EntryType { - // Default unknown type. - ENTRY_TYPE_UNSPECIFIED = 0; - - // The entry type that has a GoogleSQL schema, including - // logical views. - TABLE = 2; - - // Output only. The type of models. - // - // For more information, see [Supported models in BigQuery ML] - // (https://cloud.google.com/bigquery-ml/docs/introduction#supported_models_in). - MODEL = 5; - - // An entry type for streaming entries. For example, a Pub/Sub topic. - DATA_STREAM = 3; - - // An entry type for a set of files or objects. For example, a - // Cloud Storage fileset. - FILESET = 4; - - // A group of servers that work together. For example, a Kafka cluster. - CLUSTER = 6; - - // A database. - DATABASE = 7; - - // Output only. Connection to a data source. For example, a BigQuery - // connection. - DATA_SOURCE_CONNECTION = 8; - - // Output only. Routine, for example, a BigQuery routine. - ROUTINE = 9; - - // A Dataplex lake. - LAKE = 10; - - // A Dataplex zone. - ZONE = 11; - - // A service, for example, a Dataproc Metastore service. - SERVICE = 14; -} diff --git a/protos/google/cloud/datacatalog/v1/dataplex_spec.proto b/protos/google/cloud/datacatalog/v1/dataplex_spec.proto deleted file mode 100644 index 0cdba3e1..00000000 --- a/protos/google/cloud/datacatalog/v1/dataplex_spec.proto +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/cloud/datacatalog/v1/common.proto"; -import "google/cloud/datacatalog/v1/physical_schema.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "DataplexSpecProto"; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Common Dataplex fields. -message DataplexSpec { - // Fully qualified resource name of an asset in Dataplex, to which the - // underlying data source (Cloud Storage bucket or BigQuery dataset) of the - // entity is attached. - string asset = 1; - - // Format of the data. - PhysicalSchema data_format = 2; - - // Compression format of the data, e.g., zip, gzip etc. - string compression_format = 3; - - // Project ID of the underlying Cloud Storage or BigQuery data. Note that - // this may not be the same project as the correspondingly Dataplex lake / - // zone / asset. - string project_id = 4; -} - -// Entry specyfication for a Dataplex fileset. -message DataplexFilesetSpec { - // Common Dataplex fields. - DataplexSpec dataplex_spec = 1; -} - -// Entry specification for a Dataplex table. -message DataplexTableSpec { - // List of external tables registered by Dataplex in other systems based on - // the same underlying data. - // - // External tables allow to query this data in those systems. - repeated DataplexExternalTable external_tables = 1; - - // Common Dataplex fields. - DataplexSpec dataplex_spec = 2; - - // Indicates if the table schema is managed by the user or not. - bool user_managed = 3; -} - -// External table registered by Dataplex. -// Dataplex publishes data discovered from an asset into multiple other systems -// (BigQuery, DPMS) in form of tables. We call them "external tables". External -// tables are also synced into the Data Catalog. -// This message contains pointers to -// those external tables (fully qualified name, resource name et cetera) within -// the Data Catalog. -message DataplexExternalTable { - // Service in which the external table is registered. - IntegratedSystem system = 1; - - // Fully qualified name (FQN) of the external table. - string fully_qualified_name = 28; - - // Google Cloud resource name of the external table. - string google_cloud_resource = 3; - - // Name of the Data Catalog entry representing the external table. - string data_catalog_entry = 4; -} diff --git a/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto b/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto deleted file mode 100644 index 82a16530..00000000 --- a/protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/datacatalog/v1/timestamps.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Describes a Cloud Storage fileset entry. -message GcsFilesetSpec { - // Required. Patterns to identify a set of files in Google Cloud Storage. - // - // For more information, see [Wildcard Names] - // (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). - // - // Note: Currently, bucket wildcards are not supported. - // - // Examples of valid `file_patterns`: - // - // * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir` - // directory - // * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` - // and all subdirectories - // * `gs://bucket_name/file*`: matches files prefixed by `file` in - // `bucket_name` - // * `gs://bucket_name/??.txt`: matches files with two characters followed by - // `.txt` in `bucket_name` - // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - // vowel character followed by `.txt` in - // `bucket_name` - // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - // or `m` followed by `.txt` in `bucket_name` - // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - // the `a/*/b` pattern, such as `a/c/b`, `a/d/b` - // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - // - // You can combine wildcards to match complex sets of files, for example: - // - // `gs://bucket_name/[a-m]??.j*g` - repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Sample files contained in this fileset, not all files - // contained in this fileset are represented here. - repeated GcsFileSpec sample_gcs_file_specs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specification of a single file in Cloud Storage. -message GcsFileSpec { - // Required. Full file path. Example: `gs://bucket_name/a/b.txt`. - string file_path = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Creation, modification, and expiration timestamps of a Cloud Storage file. - SystemTimestamps gcs_timestamps = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. File size in bytes. - int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/protos/google/cloud/datacatalog/v1/physical_schema.proto b/protos/google/cloud/datacatalog/v1/physical_schema.proto deleted file mode 100644 index 414e95ca..00000000 --- a/protos/google/cloud/datacatalog/v1/physical_schema.proto +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "PhysicalSchemaProto"; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Native schema used by a resource represented as an entry. Used by query -// engines for deserializing and parsing source data. -message PhysicalSchema { - // Schema in Avro JSON format. - message AvroSchema { - // JSON source of the Avro schema. - string text = 1; - } - - // Schema in Thrift format. - message ThriftSchema { - // Thrift IDL source of the schema. - string text = 1; - } - - // Schema in protocol buffer format. - message ProtobufSchema { - // Protocol buffer source of the schema. - string text = 1; - } - - // Marks a Parquet-encoded data source. - message ParquetSchema { - - } - - // Marks an ORC-encoded data source. - message OrcSchema { - - } - - // Marks a CSV-encoded data source. - message CsvSchema { - - } - - oneof schema { - // Schema in Avro JSON format. - AvroSchema avro = 1; - - // Schema in Thrift format. - ThriftSchema thrift = 2; - - // Schema in protocol buffer format. - ProtobufSchema protobuf = 3; - - // Marks a Parquet-encoded data source. - ParquetSchema parquet = 4; - - // Marks an ORC-encoded data source. - OrcSchema orc = 5; - - // Marks a CSV-encoded data source. - CsvSchema csv = 6; - } -} diff --git a/protos/google/cloud/datacatalog/v1/policytagmanager.proto b/protos/google/cloud/datacatalog/v1/policytagmanager.proto deleted file mode 100644 index be415988..00000000 --- a/protos/google/cloud/datacatalog/v1/policytagmanager.proto +++ /dev/null @@ -1,481 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.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/datacatalog/v1/timestamps.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "PolicyTagManagerProto"; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Policy Tag Manager API service allows you to manage your policy tags and -// taxonomies. -// -// Policy tags are used to tag BigQuery columns and apply additional access -// control policies. A taxonomy is a hierarchical grouping of policy tags that -// classify data along a common axis. -service PolicyTagManager { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a taxonomy in a specified project. - // - // The taxonomy is initially empty, that is, it doesn't contain policy tags. - rpc CreateTaxonomy(CreateTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/taxonomies" - body: "taxonomy" - }; - option (google.api.method_signature) = "parent,taxonomy"; - } - - // Deletes a taxonomy, including all policy tags in this - // taxonomy, their associated policies, and the policy tags references from - // BigQuery columns. - rpc DeleteTaxonomy(DeleteTaxonomyRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/taxonomies/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a taxonomy, including its display name, - // description, and activated policy types. - rpc UpdateTaxonomy(UpdateTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - patch: "/v1/{taxonomy.name=projects/*/locations/*/taxonomies/*}" - body: "taxonomy" - }; - option (google.api.method_signature) = "taxonomy"; - } - - // Lists all taxonomies in a project in a particular location that you - // have a permission to view. - rpc ListTaxonomies(ListTaxonomiesRequest) returns (ListTaxonomiesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/taxonomies" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a taxonomy. - rpc GetTaxonomy(GetTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/taxonomies/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a policy tag in a taxonomy. - rpc CreatePolicyTag(CreatePolicyTagRequest) returns (PolicyTag) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" - body: "policy_tag" - }; - option (google.api.method_signature) = "parent,policy_tag"; - } - - // Deletes a policy tag together with the following: - // - // * All of its descendant policy tags, if any - // * Policies associated with the policy tag and its descendants - // * References from BigQuery table schema of the policy tag and its - // descendants - rpc DeletePolicyTag(DeletePolicyTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a policy tag, including its display - // name, description, and parent policy tag. - rpc UpdatePolicyTag(UpdatePolicyTagRequest) returns (PolicyTag) { - option (google.api.http) = { - patch: "/v1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}" - body: "policy_tag" - }; - option (google.api.method_signature) = "policy_tag"; - } - - // Lists all policy tags in a taxonomy. - rpc ListPolicyTags(ListPolicyTagsRequest) returns (ListPolicyTagsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a policy tag. - rpc GetPolicyTag(GetPolicyTagRequest) returns (PolicyTag) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets the IAM policy for a policy tag or a taxonomy. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy" - body: "*" - } - }; - } - - // Sets the IAM policy for a policy tag or a taxonomy. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy" - body: "*" - } - }; - } - - // Returns your permissions on a specified policy tag or - // taxonomy. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions" - body: "*" - } - }; - } -} - -// A taxonomy is a collection of hierarchical policy tags that classify data -// along a common axis. -// -// For example, a "data sensitivity" taxonomy might contain the following policy -// tags: -// -// ``` -// + PII -// + Account number -// + Age -// + SSN -// + Zipcode -// + Financials -// + Revenue -// ``` -// -// A "data origin" taxonomy might contain the following policy tags: -// -// ``` -// + User data -// + Employee data -// + Partner data -// + Public data -// ``` -message Taxonomy { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Taxonomy" - pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}" - }; - - // Defines policy types where the policy tags can be used for. - enum PolicyType { - // Unspecified policy type. - POLICY_TYPE_UNSPECIFIED = 0; - - // Fine-grained access control policy that enables access control on - // tagged sub-resources. - FINE_GRAINED_ACCESS_CONTROL = 1; - } - - // Output only. Resource name of this taxonomy in URL format. - // - // Note: Policy tag manager generates unique taxonomy IDs. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. User-defined name of this taxonomy. - // - // The name can't start or end with spaces, must contain only Unicode letters, - // numbers, underscores, dashes, and spaces, and be at most 200 bytes long - // when encoded in UTF-8. - // - // The taxonomy display name must be unique within an organization. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description of this taxonomy. If not set, defaults to empty. - // - // The description must contain only Unicode characters, tabs, newlines, - // carriage returns, and page breaks, and be at most 2000 bytes long when - // encoded in UTF-8. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Number of policy tags in this taxonomy. - int32 policy_tag_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Creation and modification timestamps of this taxonomy. - SystemTimestamps taxonomy_timestamps = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. A list of policy types that are activated for this taxonomy. If not set, - // defaults to an empty list. - repeated PolicyType activated_policy_types = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Denotes one policy tag in a taxonomy, for example, SSN. -// -// Policy tags can be defined in a hierarchy. For example: -// -// ``` -// + Geolocation -// + LatLong -// + City -// + ZipCode -// ``` -// -// Where the "Geolocation" policy tag contains three children. -message PolicyTag { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/PolicyTag" - pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" - }; - - // Output only. Resource name of this policy tag in the URL format. - // - // The policy tag manager generates unique taxonomy IDs and policy tag IDs. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. User-defined name of this policy tag. - // - // The name can't start or end with spaces and must be unique within the - // parent taxonomy, contain only Unicode letters, numbers, underscores, dashes - // and spaces, and be at most 200 bytes long when encoded in UTF-8. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Description of this policy tag. If not set, defaults to empty. - // - // The description must contain only Unicode characters, - // tabs, newlines, carriage returns and page breaks, and be at most 2000 bytes - // long when encoded in UTF-8. - string description = 3; - - // Resource name of this policy tag's parent policy tag. If empty, this is a - // top level tag. If not set, defaults to an empty string. - // - // For example, for the "LatLong" policy tag in the example above, this field - // contains the resource name of the "Geolocation" policy tag, and, for - // "Geolocation", this field is empty. - string parent_policy_tag = 4; - - // Output only. Resource names of child policy tags of this policy tag. - repeated string child_policy_tags = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [CreateTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.CreateTaxonomy]. -message CreateTaxonomyRequest { - // Required. Resource name of the project that the taxonomy will belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // The taxonomy to create. - Taxonomy taxonomy = 2; -} - -// Request message for -// [DeleteTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.DeleteTaxonomy]. -message DeleteTaxonomyRequest { - // Required. Resource name of the taxonomy to delete. - // - // Note: All policy tags in this taxonomy are also deleted. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; -} - -// Request message for -// [UpdateTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.UpdateTaxonomy]. -message UpdateTaxonomyRequest { - // The taxonomy to update. You can update only its description, display name, - // and activated policy types. - Taxonomy taxonomy = 1; - - // Specifies fields to update. If not set, defaults to all fields you can - // update. - // - // For more information, see [FieldMask] - // (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [ListTaxonomies][google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies]. -message ListTaxonomiesRequest { - // Required. Resource name of the project to list the taxonomies of. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // The maximum number of items to return. Must be a value between 1 and 1000 - // inclusively. If not set, defaults to 50. - int32 page_size = 2; - - // The pagination token of the next results page. If not set, - // the first page is returned. - // - // The token is returned in the response to a previous list request. - string page_token = 3; -} - -// Response message for -// [ListTaxonomies][google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies]. -message ListTaxonomiesResponse { - // Taxonomies that the project contains. - repeated Taxonomy taxonomies = 1; - - // Pagination token of the next results page. Empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for -// [GetTaxonomy][google.cloud.datacatalog.v1.PolicyTagManager.GetTaxonomy]. -message GetTaxonomyRequest { - // Required. Resource name of the taxonomy to get. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; -} - -// Request message for -// [CreatePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.CreatePolicyTag]. -message CreatePolicyTagRequest { - // Required. Resource name of the taxonomy that the policy tag will belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/PolicyTag" - } - ]; - - // The policy tag to create. - PolicyTag policy_tag = 2; -} - -// Request message for -// [DeletePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.DeletePolicyTag]. -message DeletePolicyTagRequest { - // Required. Resource name of the policy tag to delete. - // - // Note: All of its descendant policy tags are also deleted. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/PolicyTag" - } - ]; -} - -// Request message for -// [UpdatePolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.UpdatePolicyTag]. -message UpdatePolicyTagRequest { - // The policy tag to update. You can update only its description, display - // name, and parent policy tag fields. - PolicyTag policy_tag = 1; - - // Specifies the fields to update. - // - // You can update only display name, description, and parent policy tag. - // If not set, defaults to all updatable fields. - // For more information, see [FieldMask] - // (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [ListPolicyTags][google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags]. -message ListPolicyTagsRequest { - // Required. Resource name of the taxonomy to list the policy tags of. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/PolicyTag" - } - ]; - - // The maximum number of items to return. Must be a value between 1 and 1000 - // inclusively. - // If not set, defaults to 50. - int32 page_size = 2; - - // The pagination token of the next results page. If not set, returns the - // first page. - // - // The token is returned in the response to a previous list request. - string page_token = 3; -} - -// Response message for -// [ListPolicyTags][google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags]. -message ListPolicyTagsResponse { - // The policy tags that belong to the taxonomy. - repeated PolicyTag policy_tags = 1; - - // Pagination token of the next results page. Empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for -// [GetPolicyTag][google.cloud.datacatalog.v1.PolicyTagManager.GetPolicyTag]. -message GetPolicyTagRequest { - // Required. Resource name of the policy tag. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/PolicyTag" - } - ]; -} diff --git a/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto b/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto deleted file mode 100644 index a4fe4d8b..00000000 --- a/protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.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/datacatalog/v1/policytagmanager.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "PolicyTagManagerSerializationProto"; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Policy Tag Manager Serialization API service allows you to manipulate -// your policy tags and taxonomies in a serialized format. -// -// Taxonomy is a hierarchical group of policy tags. -service PolicyTagManagerSerialization { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Replaces (updates) a taxonomy and all its policy tags. - // - // The taxonomy and its entire hierarchy of policy tags must be - // represented literally by `SerializedTaxonomy` and the nested - // `SerializedPolicyTag` messages. - // - // This operation automatically does the following: - // - // - Deletes the existing policy tags that are missing from the - // `SerializedPolicyTag`. - // - Creates policy tags that don't have resource names. They are considered - // new. - // - Updates policy tags with valid resources names accordingly. - rpc ReplaceTaxonomy(ReplaceTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/taxonomies/*}:replace" - body: "*" - }; - } - - // Creates new taxonomies (including their policy tags) in a given project - // by importing from inlined or cross-regional sources. - // - // For a cross-regional source, new taxonomies are created by copying - // from a source in another region. - // - // For an inlined source, taxonomies and policy tags are created in bulk using - // nested protocol buffer structures. - rpc ImportTaxonomies(ImportTaxonomiesRequest) returns (ImportTaxonomiesResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/taxonomies:import" - body: "*" - }; - } - - // Exports taxonomies in the requested type and returns them, - // including their policy tags. The requested taxonomies must belong to the - // same project. - // - // This method generates `SerializedTaxonomy` protocol buffers with nested - // policy tags that can be used as input for `ImportTaxonomies` calls. - rpc ExportTaxonomies(ExportTaxonomiesRequest) returns (ExportTaxonomiesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/taxonomies:export" - }; - } -} - -// A nested protocol buffer that represents a taxonomy and the hierarchy of its -// policy tags. Used for taxonomy replacement, import, and -// export. -message SerializedTaxonomy { - // Required. Display name of the taxonomy. At most 200 bytes when encoded in UTF-8. - string display_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Description of the serialized taxonomy. At most 2000 bytes when - // encoded in UTF-8. If not set, defaults to an empty description. - string description = 2; - - // Top level policy tags associated with the taxonomy, if any. - repeated SerializedPolicyTag policy_tags = 3; - - // A list of policy types that are activated per taxonomy. - repeated Taxonomy.PolicyType activated_policy_types = 4; -} - -// A nested protocol buffer that represents a policy tag and all its -// descendants. -message SerializedPolicyTag { - // Resource name of the policy tag. - // - // This field is ignored when calling `ImportTaxonomies`. - string policy_tag = 1; - - // Required. Display name of the policy tag. At most 200 bytes when encoded - // in UTF-8. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Description of the serialized policy tag. At most - // 2000 bytes when encoded in UTF-8. If not set, defaults to an - // empty description. - string description = 3; - - // Children of the policy tag, if any. - repeated SerializedPolicyTag child_policy_tags = 4; -} - -// Request message for -// [ReplaceTaxonomy][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ReplaceTaxonomy]. -message ReplaceTaxonomyRequest { - // Required. Resource name of the taxonomy to update. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Required. Taxonomy to update along with its child policy tags. - SerializedTaxonomy serialized_taxonomy = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [ImportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies]. -message ImportTaxonomiesRequest { - // Required. Resource name of project that the imported taxonomies will belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Source taxonomies to import. - oneof source { - // Inline source taxonomy to import. - InlineSource inline_source = 2; - - // Cross-regional source taxonomy to import. - CrossRegionalSource cross_regional_source = 3; - } -} - -// Inline source containing taxonomies to import. -message InlineSource { - // Required. Taxonomies to import. - repeated SerializedTaxonomy taxonomies = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Cross-regional source used to import an existing taxonomy into a different -// region. -message CrossRegionalSource { - // Required. The resource name of the source taxonomy to import. - string taxonomy = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; -} - -// Response message for -// [ImportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies]. -message ImportTaxonomiesResponse { - // Imported taxonomies. - repeated Taxonomy taxonomies = 1; -} - -// Request message for -// [ExportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies]. -message ExportTaxonomiesRequest { - // Required. Resource name of the project that the exported taxonomies belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Required. Resource names of the taxonomies to export. - repeated string taxonomies = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Required. Export destination for taxonomies. - oneof destination { - // Serialized export taxonomies that contain all the policy - // tags as nested protocol buffers. - bool serialized_taxonomies = 3; - } -} - -// Response message for -// [ExportTaxonomies][google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies]. -message ExportTaxonomiesResponse { - // List of taxonomies and policy tags as nested protocol buffers. - repeated SerializedTaxonomy taxonomies = 1; -} diff --git a/protos/google/cloud/datacatalog/v1/schema.proto b/protos/google/cloud/datacatalog/v1/schema.proto deleted file mode 100644 index b33caac4..00000000 --- a/protos/google/cloud/datacatalog/v1/schema.proto +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/api/field_behavior.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Represents a schema, for example, a BigQuery, GoogleSQL, or Avro schema. -message Schema { - // The unified GoogleSQL-like schema of columns. - // - // The overall maximum number of columns and nested columns is 10,000. - // The maximum nested depth is 15 levels. - repeated ColumnSchema columns = 2; -} - -// A column within a schema. Columns can be nested inside -// other columns. -message ColumnSchema { - // Required. Name of the column. - // - // Must be a UTF-8 string without dots (.). - // The maximum size is 64 bytes. - string column = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. Type of the column. - // - // Must be a UTF-8 string with the maximum size of 128 bytes. - string type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description of the column. Default value is an empty string. - // - // The description must be a UTF-8 string with the maximum size of 2000 - // bytes. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A column's mode indicates whether values in this column are required, - // nullable, or repeated. - // - // Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. - // Default mode is `NULLABLE`. - string mode = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Schema of sub-columns. A column can have zero or more sub-columns. - repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/protos/google/cloud/datacatalog/v1/search.proto b/protos/google/cloud/datacatalog/v1/search.proto deleted file mode 100644 index 88c06a46..00000000 --- a/protos/google/cloud/datacatalog/v1/search.proto +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/datacatalog/v1/common.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Result in the response to a search request. -// -// Each result captures details of one entry that matches the search. -message SearchCatalogResult { - // Type of the search result. - // - // You can use this field to determine which get method to call to fetch the - // full resource. - SearchResultType search_result_type = 1; - - // Sub-type of the search result. - // - // A dot-delimited full type of the resource. The same type you - // specify in the `type` search predicate. - // - // Examples: `entry.table`, `entry.dataStream`, `tagTemplate`. - string search_result_subtype = 2; - - // The relative name of the resource in URL format. - // - // Examples: - // - // * `projects/{PROJECT_ID}/locations/{LOCATION_ID}/entryGroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}` - // * `projects/{PROJECT_ID}/tagTemplates/{TAG_TEMPLATE_ID}` - string relative_resource_name = 3; - - // The full name of the Google Cloud resource the entry belongs to. - // - // For more information, see [Full Resource Name] - // (/apis/design/resource_names#full_resource_name). - // - // Example: - // - // `//bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID` - string linked_resource = 4; - - // The last modification timestamp of the entry in the source system. - google.protobuf.Timestamp modify_time = 7; - - // The source system of the entry. Applicable only when the - // `search_result_type` is `ENTRY`. - oneof system { - // Output only. The source system that Data Catalog automatically integrates with, such - // as BigQuery, Cloud Pub/Sub, or Dataproc Metastore. - IntegratedSystem integrated_system = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Custom source system that you can manually integrate Data Catalog with. - string user_specified_system = 9; - } - - // Fully qualified name (FQN) of the resource. - // - // FQNs take two forms: - // - // * For non-regionalized resources: - // - // `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - // - // * For regionalized resources: - // - // `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - // - // Example for a DPMS table: - // - // `dataproc_metastore:PROJECT_ID.LOCATION_ID.INSTANCE_ID.DATABASE_ID.TABLE_ID` - string fully_qualified_name = 10; - - // The display name of the result. - string display_name = 12; - - // Entry description that can consist of several sentences or paragraphs that - // describe entry contents. - string description = 13; -} - -// The resource types that can be returned in search results. -enum SearchResultType { - // Default unknown type. - SEARCH_RESULT_TYPE_UNSPECIFIED = 0; - - // An [Entry][google.cloud.datacatalog.v1.Entry]. - ENTRY = 1; - - // A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate]. - TAG_TEMPLATE = 2; - - // An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. - ENTRY_GROUP = 3; -} diff --git a/protos/google/cloud/datacatalog/v1/table_spec.proto b/protos/google/cloud/datacatalog/v1/table_spec.proto deleted file mode 100644 index cbf7ad3e..00000000 --- a/protos/google/cloud/datacatalog/v1/table_spec.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Describes a BigQuery table. -message BigQueryTableSpec { - // Output only. The table source type. - TableSourceType table_source_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. - oneof type_spec { - // Table view specification. Populated only if - // the `table_source_type` is `BIGQUERY_VIEW`. - ViewSpec view_spec = 2; - - // Specification of a BigQuery table. Populated only if - // the `table_source_type` is `BIGQUERY_TABLE`. - TableSpec table_spec = 3; - } -} - -// Table source type. -enum TableSourceType { - // Default unknown type. - TABLE_SOURCE_TYPE_UNSPECIFIED = 0; - - // Table view. - BIGQUERY_VIEW = 2; - - // BigQuery native table. - BIGQUERY_TABLE = 5; - - // BigQuery materialized view. - BIGQUERY_MATERIALIZED_VIEW = 7; -} - -// Table view specification. -message ViewSpec { - // Output only. The query that defines the table view. - string view_query = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Normal BigQuery table specification. -message TableSpec { - // Output only. If the table is date-sharded, that is, it matches the `[prefix]YYYYMMDD` - // name pattern, this field is the Data Catalog resource name of the - // date-sharded grouped entry. For example: - // - // `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - // - // Otherwise, `grouped_entry` is empty. - string grouped_entry = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Specification for a group of BigQuery tables with the `[prefix]YYYYMMDD` name -// pattern. -// -// For more information, see [Introduction to partitioned tables] -// (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding). -message BigQueryDateShardedSpec { - // Output only. The Data Catalog resource name of the dataset entry the current table - // belongs to. For example: - // - // `projects/{PROJECT_ID}/locations/{LOCATION}/entrygroups/{ENTRY_GROUP_ID}/entries/{ENTRY_ID}`. - string dataset = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; - - // Output only. The table name prefix of the shards. - // - // The name of any given shard is `[table_prefix]YYYYMMDD`. - // For example, for the `MyTable20180101` shard, the - // `table_prefix` is `MyTable`. - string table_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Total number of shards. - int64 shard_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. BigQuery resource name of the latest shard. - string latest_shard_resource = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/protos/google/cloud/datacatalog/v1/tags.proto b/protos/google/cloud/datacatalog/v1/tags.proto deleted file mode 100644 index dedfd2f6..00000000 --- a/protos/google/cloud/datacatalog/v1/tags.proto +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Tags contain custom metadata and are attached to Data Catalog resources. Tags -// conform with the specification of their tag template. -// -// See [Data Catalog -// IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information -// on the permissions needed to create or view tags. -message Tag { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Tag" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" - }; - - // The resource name of the tag in URL format where tag ID is a - // system-generated identifier. - // - // Note: The tag itself might not be stored in the location specified in its - // name. - string name = 1; - - // Required. The resource name of the tag template this tag uses. Example: - // - // `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` - // - // This field cannot be modified after creation. - string template = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The display name of the tag template. - string template_display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The scope within the parent resource that this tag is attached to. If not - // provided, the tag is attached to the parent resource itself. - // - // Deleting the scope from the parent resource deletes all tags attached - // to that scope. - // - // These fields cannot be updated after creation. - oneof scope { - // Resources like entry can have schemas associated with them. This scope - // allows you to attach tags to an individual column based on that schema. - // - // To attach a tag to a nested column, separate column names with a dot - // (`.`). Example: `column.nested_column`. - string column = 4; - } - - // Required. Maps the ID of a tag field to its value and additional information - // about that field. - // - // Tag template defines valid field IDs. A tag - // must have at least 1 field and at most 500 fields. - map fields = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Contains the value and additional information on a field within -// a [Tag][google.cloud.datacatalog.v1.Tag]. -message TagField { - // An enum value. - message EnumValue { - // The display name of the enum value. - string display_name = 1; - } - - // Output only. The display name of this field. - string display_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The value of this field. - oneof kind { - // The value of a tag field with a double type. - double double_value = 2; - - // The value of a tag field with a string type. - // - // The maximum length is 2000 UTF-8 characters. - string string_value = 3; - - // The value of a tag field with a boolean type. - bool bool_value = 4; - - // The value of a tag field with a timestamp type. - google.protobuf.Timestamp timestamp_value = 5; - - // The value of a tag field with an enum type. - // - // This value must be one of the allowed values listed in this enum. - EnumValue enum_value = 6; - - // The value of a tag field with a rich text type. - // - // The maximum length is 10 MiB as this value holds HTML descriptions - // including encoded images. The maximum length of the text without images - // is 100 KiB. - string richtext_value = 8; - } - - // Output only. The order of this field with respect to other fields in this tag. Can be - // set by [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. - // - // For example, a higher value can indicate a more important field. - // The value can be negative. Multiple fields can have the same order, and - // field orders within a tag don't have to be sequential. - int32 order = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A tag template defines a tag that can have one or more typed fields. -// -// The template is used to create tags that are attached to GCP resources. -// [Tag template roles] -// (https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) -// provide permissions to create, edit, and use the template. For example, -// see the [TagTemplate User] -// (https://cloud.google.com/data-catalog/docs/how-to/template-user) role -// that includes a permission to use the tag template to tag resources. -message TagTemplate { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/TagTemplate" - pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}" - }; - - // The resource name of the tag template in URL format. - // - // Note: The tag template itself and its child resources might not be - // stored in the location specified in its name. - string name = 1; - - // Display name for this template. Defaults to an empty string. - // - // The name must contain only Unicode letters, numbers (0-9), underscores (_), - // dashes (-), spaces ( ), and can't start or end with spaces. - // The maximum length is 200 characters. - string display_name = 2; - - // Indicates whether tags created with this template are public. Public tags - // do not require tag template access to appear in - // [ListTags][google.cloud.datacatalog.v1.ListTags] API response. - // - // Additionally, you can search for a public tag by value with a - // simple search query in addition to using a ``tag:`` predicate. - bool is_publicly_readable = 5; - - // Required. Map of tag template field IDs to the settings for the field. - // This map is an exhaustive list of the allowed fields. The map must contain - // at least one field and at most 500 fields. - // - // The keys to this map are tag template field IDs. The IDs have the - // following limitations: - // - // * Can contain uppercase and lowercase letters, numbers (0-9) and - // underscores (_). - // * Must be at least 1 character and at most 64 characters long. - // * Must start with a letter or underscore. - map fields = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The template for an individual field within a tag template. -message TagTemplateField { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/TagTemplateField" - pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" - }; - - // Output only. The resource name of the tag template field in URL format. Example: - // - // `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` - // - // Note: The tag template field itself might not be stored in the location - // specified in its name. - // - // The name must contain only letters (a-z, A-Z), numbers (0-9), - // or underscores (_), and must start with a letter or underscore. - // The maximum length is 64 characters. - string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The display name for this field. Defaults to an empty string. - // - // The name must contain only Unicode letters, numbers (0-9), underscores (_), - // dashes (-), spaces ( ), and can't start or end with spaces. - // The maximum length is 200 characters. - string display_name = 1; - - // Required. The type of value this tag field can contain. - FieldType type = 2 [(google.api.field_behavior) = REQUIRED]; - - // If true, this field is required. Defaults to false. - bool is_required = 3; - - // The description for this field. Defaults to an empty string. - string description = 4; - - // The order of this field with respect to other fields in this tag - // template. - // - // For example, a higher value can indicate a more important field. - // The value can be negative. Multiple fields can have the same order and - // field orders within a tag don't have to be sequential. - int32 order = 5; -} - -message FieldType { - enum PrimitiveType { - // The default invalid value for a type. - PRIMITIVE_TYPE_UNSPECIFIED = 0; - - // A double precision number. - DOUBLE = 1; - - // An UTF-8 string. - STRING = 2; - - // A boolean value. - BOOL = 3; - - // A timestamp. - TIMESTAMP = 4; - - // A Richtext description. - RICHTEXT = 5; - } - - message EnumType { - message EnumValue { - // Required. The display name of the enum value. Must not be an empty string. - // - // The name must contain only Unicode letters, numbers (0-9), underscores - // (_), dashes (-), spaces ( ), and can't start or end with spaces. The - // maximum length is 200 characters. - string display_name = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // The set of allowed values for this enum. - // - // This set must not be empty and can include up to 100 allowed values. - // The display names of the values in this set must not be empty and must - // be case-insensitively unique within this set. - // - // The order of items in this set is preserved. This field can be used to - // create, remove, and reorder enum values. To rename enum values, use the - // `RenameTagTemplateFieldEnumValue` method. - repeated EnumValue allowed_values = 1; - } - - // Required. - oneof type_decl { - // Primitive types, such as string, boolean, etc. - PrimitiveType primitive_type = 1; - - // An enum type. - EnumType enum_type = 2; - } -} diff --git a/protos/google/cloud/datacatalog/v1/timestamps.proto b/protos/google/cloud/datacatalog/v1/timestamps.proto deleted file mode 100644 index fe96d7d3..00000000 --- a/protos/google/cloud/datacatalog/v1/timestamps.proto +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Timestamps associated with this resource in a particular system. -message SystemTimestamps { - // Creation timestamp of the resource within the given system. - google.protobuf.Timestamp create_time = 1; - - // Timestamp of the last modification of the resource or its metadata within - // a given system. - // - // Note: Depending on the source system, not every modification updates this - // timestamp. - // For example, BigQuery timestamps every metadata modification but not data - // or permission changes. - google.protobuf.Timestamp update_time = 2; - - // Output only. Expiration timestamp of the resource within the given system. - // - // Currently only applicable to BigQuery resources. - google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/protos/google/cloud/datacatalog/v1/usage.proto b/protos/google/cloud/datacatalog/v1/usage.proto deleted file mode 100644 index d778e512..00000000 --- a/protos/google/cloud/datacatalog/v1/usage.proto +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Detailed statistics on the entry's usage. -// -// Usage statistics have the following limitations: -// -// - Only BigQuery tables have them. -// - They only include BigQuery query jobs. -// - They might be underestimated because wildcard table references -// are not yet counted. For more information, see -// [Querying multiple tables using a wildcard table] -// (https://cloud.google.com/bigquery/docs/querying-wildcard-tables) -message UsageStats { - // The number of successful uses of the underlying entry. - float total_completions = 1; - - // The number of failed attempts to use the underlying entry. - float total_failures = 2; - - // The number of cancelled attempts to use the underlying entry. - float total_cancellations = 3; - - // Total time spent only on successful uses, in milliseconds. - float total_execution_time_for_completions_millis = 4; -} - -// The set of all usage signals that Data Catalog stores. -// -// Note: Usually, these signals are updated daily. In rare cases, an update may -// fail but will be performed again on the next day. -message UsageSignal { - // The end timestamp of the duration of usage statistics. - google.protobuf.Timestamp update_time = 1; - - // Output only. BigQuery usage statistics over each of the predefined time ranges. - // - // Supported time ranges are `{"24H", "7D", "30D"}`. - map usage_within_time_range = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/protos/google/cloud/datacatalog/v1beta1/common.proto b/protos/google/cloud/datacatalog/v1beta1/common.proto deleted file mode 100644 index a759b371..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/common.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1beta1; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// This enum describes all the possible systems that Data Catalog integrates -// with. -enum IntegratedSystem { - // Default unknown system. - INTEGRATED_SYSTEM_UNSPECIFIED = 0; - - // BigQuery. - BIGQUERY = 1; - - // Cloud Pub/Sub. - CLOUD_PUBSUB = 2; -} diff --git a/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto b/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto deleted file mode 100644 index 5f265d5b..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/datacatalog.proto +++ /dev/null @@ -1,1186 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.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/datacatalog/v1beta1/common.proto"; -import "google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto"; -import "google/cloud/datacatalog/v1beta1/schema.proto"; -import "google/cloud/datacatalog/v1beta1/search.proto"; -import "google/cloud/datacatalog/v1beta1/table_spec.proto"; -import "google/cloud/datacatalog/v1beta1/tags.proto"; -import "google/cloud/datacatalog/v1beta1/timestamps.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Data Catalog API service allows clients to discover, understand, and manage -// their data. -service DataCatalog { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Searches Data Catalog for multiple resources like entries, tags that - // match a query. - // - // This is a custom method - // (https://cloud.google.com/apis/design/custom_methods) and does not return - // the complete resource, only the resource identifier and high level - // fields. Clients can subsequentally call `Get` methods. - // - // Note that Data Catalog search queries do not guarantee full recall. Query - // results that match your query may not be returned, even in subsequent - // result pages. Also note that results returned (and not returned) can vary - // across repeated search queries. - // - // See [Data Catalog Search - // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - // for more information. - rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { - option (google.api.http) = { - post: "/v1beta1/catalog:search" - body: "*" - }; - option (google.api.method_signature) = "scope,query"; - } - - // A maximum of 10,000 entry groups may be created per organization across all - // locations. - // - // Users should enable the Data Catalog API in the project identified by - // the `parent` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/entryGroups" - body: "entry_group" - }; - option (google.api.method_signature) = "parent,entry_group_id,entry_group"; - } - - // Updates an EntryGroup. The user should enable the Data Catalog API in the - // project identified by the `entry_group.name` parameter (see [Data Catalog - // Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - patch: "/v1beta1/{entry_group.name=projects/*/locations/*/entryGroups/*}" - body: "entry_group" - }; - option (google.api.method_signature) = "entry_group"; - option (google.api.method_signature) = "entry_group,update_mask"; - } - - // Gets an EntryGroup. - rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.api.method_signature) = "name,read_mask"; - } - - // Deletes an EntryGroup. Only entry groups that do not contain entries can be - // deleted. Users should enable the Data Catalog API in the project - // identified by the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists entry groups. - rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/entryGroups" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates an entry. Only entries of 'FILESET' type or user-specified type can - // be created. - // - // Users should enable the Data Catalog API in the project identified by - // the `parent` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - // - // A maximum of 100,000 entries may be created per entry group. - rpc CreateEntry(CreateEntryRequest) returns (Entry) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries" - body: "entry" - }; - option (google.api.method_signature) = "parent,entry_id,entry"; - } - - // Updates an existing entry. - // Users should enable the Data Catalog API in the project identified by - // the `entry.name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { - option (google.api.http) = { - patch: "/v1beta1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" - body: "entry" - }; - option (google.api.method_signature) = "entry"; - option (google.api.method_signature) = "entry,update_mask"; - } - - // Deletes an existing entry. Only entries created through - // [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] - // method can be deleted. - // Users should enable the Data Catalog API in the project identified by - // the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets an entry. - rpc GetEntry(GetEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Get an entry by target resource name. This method allows clients to use - // the resource name from the source Google Cloud Platform service to get the - // Data Catalog Entry. - rpc LookupEntry(LookupEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1beta1/entries:lookup" - }; - } - - // Lists entries. - rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a tag template. The user should enable the Data Catalog API in - // the project identified by the `parent` parameter (see [Data Catalog - // Resource - // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - // for more information). - rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/tagTemplates" - body: "tag_template" - }; - option (google.api.method_signature) = "parent,tag_template_id,tag_template"; - } - - // Gets a tag template. - rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a tag template. This method cannot be used to update the fields of - // a template. The tag template fields are represented as separate resources - // and should be updated using their own create/update/delete methods. - // Users should enable the Data Catalog API in the project identified by - // the `tag_template.name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - patch: "/v1beta1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" - body: "tag_template" - }; - option (google.api.method_signature) = "tag_template"; - option (google.api.method_signature) = "tag_template,update_mask"; - } - - // Deletes a tag template and all tags using the template. - // Users should enable the Data Catalog API in the project identified by - // the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" - }; - option (google.api.method_signature) = "name,force"; - } - - // Creates a field in a tag template. The user should enable the Data Catalog - // API in the project identified by the `parent` parameter (see - // [Data Catalog Resource - // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - // for more information). - rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/tagTemplates/*}/fields" - body: "tag_template_field" - }; - option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field"; - } - - // Updates a field in a tag template. This method cannot be used to update the - // field type. Users should enable the Data Catalog API in the project - // identified by the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { - option (google.api.http) = { - patch: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - body: "tag_template_field" - }; - option (google.api.method_signature) = "name,tag_template_field"; - option (google.api.method_signature) = "name,tag_template_field,update_mask"; - } - - // Renames a field in a tag template. The user should enable the Data Catalog - // API in the project identified by the `name` parameter (see [Data Catalog - // Resource - // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - // for more information). - rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" - body: "*" - }; - option (google.api.method_signature) = "name,new_tag_template_field_id"; - } - - // Deletes a field in a tag template and all uses of that field. - // Users should enable the Data Catalog API in the project identified by - // the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - }; - option (google.api.method_signature) = "name,force"; - } - - // Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. - // Note: The project identified by the `parent` parameter for the - // [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) - // and the - // [tag - // template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) - // used to create the tag must be from the same organization. - rpc CreateTag(CreateTagRequest) returns (Tag) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" - body: "tag" - additional_bindings { - post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags" - body: "tag" - } - }; - option (google.api.method_signature) = "parent,tag"; - } - - // Updates an existing tag. - rpc UpdateTag(UpdateTagRequest) returns (Tag) { - option (google.api.http) = { - patch: "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" - body: "tag" - additional_bindings { - patch: "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}" - body: "tag" - } - }; - option (google.api.method_signature) = "tag"; - option (google.api.method_signature) = "tag,update_mask"; - } - - // Deletes a tag. - rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" - additional_bindings { - delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/tags/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. - rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" - additional_bindings { - get: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Sets the access control policy for a resource. Replaces any existing - // policy. - // Supported resources are: - // - Tag templates. - // - Entries. - // - Entry groups. - // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - // and any external Google Cloud Platform resources synced to Data Catalog. - // - // Callers must have following Google IAM permission - // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag - // templates. - // - `datacatalog.entries.setIamPolicy` to set policies on entries. - // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy" - body: "*" - } - }; - - option (google.api.method_signature) = "resource,policy"; - } - - // Gets the access control policy for a resource. A `NOT_FOUND` error - // is returned if the resource does not exist. An empty policy is returned - // if the resource exists but does not have a policy set on it. - // - // Supported resources are: - // - Tag templates. - // - Entries. - // - Entry groups. - // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - // and any external Google Cloud Platform resources synced to Data Catalog. - // - // Callers must have following Google IAM permission - // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag - // templates. - // - `datacatalog.entries.getIamPolicy` to get policies on entries. - // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy" - body: "*" - } - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy" - body: "*" - } - }; - option (google.api.method_signature) = "resource"; - } - - // Returns the caller's permissions on a resource. - // If the resource does not exist, an empty set of permissions is returned - // (We don't return a `NOT_FOUND` error). - // - // Supported resources are: - // - Tag templates. - // - Entries. - // - Entry groups. - // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - // and any external Google Cloud Platform resources synced to Data Catalog. - // - // A caller is not required to have Google IAM permission to make this - // request. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions" - body: "*" - } - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions" - body: "*" - } - }; - } -} - -// Request message for -// [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. -message SearchCatalogRequest { - // The criteria that select the subspace used for query matching. - message Scope { - // The list of organization IDs to search within. To find your organization - // ID, follow instructions in - // https://cloud.google.com/resource-manager/docs/creating-managing-organization. - repeated string include_org_ids = 2; - - // The list of project IDs to search within. To learn more about the - // distinction between project names/IDs/numbers, go to - // https://cloud.google.com/docs/overview/#projects. - repeated string include_project_ids = 3; - - // If `true`, include Google Cloud Platform (GCP) public datasets in the - // search results. Info on GCP public datasets is available at - // https://cloud.google.com/public-datasets/. By default, GCP public - // datasets are excluded. - bool include_gcp_public_datasets = 7; - } - - // Required. The scope of this search request. A `scope` that has empty - // `include_org_ids`, `include_project_ids` AND false - // `include_gcp_public_datasets` is considered invalid. Data Catalog will - // return an error in such a case. - Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. The query string in search query syntax. The query must be non-empty. - // - // Query strings can be simple as "x" or more qualified as: - // - // * name:x - // * column:x - // * description:y - // - // Note: Query tokens need to have a minimum of 3 characters for substring - // matching to work correctly. See [Data Catalog Search - // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - // for more information. - string query = 1 [(google.api.field_behavior) = REQUIRED]; - - // Number of results in the search page. If <=0 then defaults to 10. Max limit - // for page_size is 1000. Throws an invalid argument for page_size > 1000. - int32 page_size = 2; - - // Optional. Pagination token returned in an earlier - // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token], which - // indicates that this is a continuation of a prior - // [SearchCatalogRequest][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog] - // call, and that the system should return the next page of data. If empty, - // the first page is returned. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Specifies the ordering of results, currently supported case-sensitive - // choices are: - // - // * `relevance`, only supports descending - // * `last_modified_timestamp [asc|desc]`, defaults to descending if not - // specified - // - // If not specified, defaults to `relevance` descending. - string order_by = 5; -} - -// Response message for -// [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. -message SearchCatalogResponse { - // Search results. - repeated SearchCatalogResult results = 1; - - // The token that can be used to retrieve the next page of results. - string next_page_token = 3; -} - -// Request message for -// [CreateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup]. -message CreateEntryGroupRequest { - // Required. The name of the project this entry group is in. Example: - // - // * projects/{project_id}/locations/{location} - // - // Note that this EntryGroup and its child resources may not actually be - // stored in the location in this name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Required. The id of the entry group to create. - // The id must begin with a letter or underscore, contain only English - // letters, numbers and underscores, and be at most 64 characters. - string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // The entry group to create. Defaults to an empty entry group. - EntryGroup entry_group = 2; -} - -// Request message for -// [UpdateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup]. -message UpdateEntryGroupRequest { - // Required. The updated entry group. "name" field must be set. - EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; - - // The fields to update on the entry group. If absent or empty, all modifiable - // fields are updated. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [GetEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup]. -message GetEntryGroupRequest { - // Required. The name of the entry group. For example, - // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // The fields to return. If not set or empty, all fields are returned. - google.protobuf.FieldMask read_mask = 2; -} - -// Request message for -// [DeleteEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup]. -message DeleteEntryGroupRequest { - // Required. The name of the entry group. For example, - // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Optional. If true, deletes all entries in the entry group. - bool force = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. -message ListEntryGroupsRequest { - // Required. The name of the location that contains the entry groups, which can be - // provided in URL format. Example: - // - // * projects/{project_id}/locations/{location} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Optional. The maximum number of items to return. Default is 10. Max limit is 1000. - // Throws an invalid argument for `page_size > 1000`. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Token that specifies which page is requested. If empty, the first page is - // returned. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. -message ListEntryGroupsResponse { - // EntryGroup details. - repeated EntryGroup entry_groups = 1; - - // Token to retrieve the next page of results. It is set to empty if no items - // remain in results. - string next_page_token = 2; -} - -// Request message for -// [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry]. -message CreateEntryRequest { - // Required. The name of the entry group this entry is in. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - // - // Note that this Entry and its child resources may not actually be stored in - // the location in this name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Required. The id of the entry to create. - string entry_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The entry to create. - Entry entry = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry]. -message UpdateEntryRequest { - // Required. The updated entry. The "name" field must be set. - Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; - - // The fields to update on the entry. If absent or empty, all modifiable - // fields are updated. - // - // The following fields are modifiable: - // * For entries with type `DATA_STREAM`: - // * `schema` - // * For entries with type `FILESET` - // * `schema` - // * `display_name` - // * `description` - // * `gcs_fileset_spec` - // * `gcs_fileset_spec.file_patterns` - // * For entries with `user_specified_type` - // * `schema` - // * `display_name` - // * `description` - // * user_specified_type - // * user_specified_system - // * linked_resource - // * source_system_timestamps - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteEntry][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry]. -message DeleteEntryRequest { - // Required. The name of the entry. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Request message for -// [GetEntry][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry]. -message GetEntryRequest { - // Required. The name of the entry. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Request message for -// [LookupEntry][google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry]. -message LookupEntryRequest { - // Required. Represents either the Google Cloud Platform resource or SQL name - // for a Google Cloud Platform resource. - oneof target_name { - // The full name of the Google Cloud Platform resource the Data Catalog - // entry represents. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name. - // Full names are case-sensitive. - // - // Examples: - // - // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - // * //pubsub.googleapis.com/projects/projectId/topics/topicId - string linked_resource = 1; - - // The SQL name of the entry. SQL names are case-sensitive. - // - // Examples: - // - // * `pubsub.project_id.topic_id` - // * ``pubsub.project_id.`topic.id.with.dots` `` - // * `bigquery.table.project_id.dataset_id.table_id` - // * `bigquery.dataset.project_id.dataset_id` - // * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - // - // `*_id`s shoud satisfy the standard SQL rules for identifiers. - // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. - string sql_resource = 3; - } -} - -// Entry Metadata. -// A Data Catalog Entry resource represents another resource in Google -// Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic), or -// outside of Google Cloud Platform. Clients can use the `linked_resource` field -// in the Entry resource to refer to the original resource ID of the source -// system. -// -// An Entry resource contains resource details, such as its schema. An Entry can -// also be used to attach flexible metadata, such as a -// [Tag][google.cloud.datacatalog.v1beta1.Tag]. -message Entry { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Entry" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" - }; - - // The Data Catalog resource name of the entry in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - // - // Note that this Entry and its child resources may not actually be stored in - // the location in this name. - string name = 1 [(google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - }]; - - // The resource this metadata entry refers to. - // - // For Google Cloud Platform resources, `linked_resource` is the [full name of - // the - // resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). - // For example, the `linked_resource` for a table resource from BigQuery is: - // - // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - // - // Output only when Entry is of type in the EntryType enum. For entries with - // user_specified_type, this field is optional and defaults to an empty - // string. - string linked_resource = 9; - - // Required. Entry type. - oneof entry_type { - // The type of the entry. - // Only used for Entries with types in the EntryType enum. - EntryType type = 2; - - // Entry type if it does not fit any of the input-allowed values listed in - // `EntryType` enum above. When creating an entry, users should check the - // enum values first, if nothing matches the entry to be created, then - // provide a custom value, for example "my_special_type". - // `user_specified_type` strings must begin with a letter or underscore and - // can only contain letters, numbers, and underscores; are case insensitive; - // must be at least 1 character and at most 64 characters long. - // - // Currently, only FILESET enum value is allowed. All other entries created - // through Data Catalog must use `user_specified_type`. - string user_specified_type = 16; - } - - // The source system of the entry. - oneof system { - // Output only. This field indicates the entry's source system that Data Catalog - // integrates with, such as BigQuery or Pub/Sub. - IntegratedSystem integrated_system = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This field indicates the entry's source system that Data Catalog does not - // integrate with. `user_specified_system` strings must begin with a letter - // or underscore and can only contain letters, numbers, and underscores; are - // case insensitive; must be at least 1 character and at most 64 characters - // long. - string user_specified_system = 18; - } - - // Type specification information. - oneof type_spec { - // Specification that applies to a Cloud Storage fileset. This is only valid - // on entries of type FILESET. - GcsFilesetSpec gcs_fileset_spec = 6; - - // Specification that applies to a BigQuery table. This is only valid on - // entries of type `TABLE`. - BigQueryTableSpec bigquery_table_spec = 12; - - // Specification for a group of BigQuery tables with name pattern - // `[prefix]YYYYMMDD`. Context: - // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. - BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; - } - - // Display information such as title and description. A short name to identify - // the entry, for example, "Analytics Data - Jan 2011". Default value is an - // empty string. - string display_name = 3; - - // Entry description, which can consist of several sentences or paragraphs - // that describe entry contents. Default value is an empty string. - string description = 4; - - // Schema of the entry. An entry might not have any schema attached to it. - Schema schema = 5; - - // Output only. Timestamps about the underlying resource, not about this Data Catalog - // entry. Output only when Entry is of type in the EntryType enum. For entries - // with user_specified_type, this field is optional and defaults to an empty - // timestamp. - SystemTimestamps source_system_timestamps = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// EntryGroup Metadata. -// An EntryGroup resource represents a logical grouping of zero or more -// Data Catalog [Entry][google.cloud.datacatalog.v1beta1.Entry] resources. -message EntryGroup { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/EntryGroup" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" - }; - - // The resource name of the entry group in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - // - // Note that this EntryGroup and its child resources may not actually be - // stored in the location in this name. - string name = 1; - - // A short name to identify the entry group, for example, - // "analytics data - jan 2011". Default value is an empty string. - string display_name = 2; - - // Entry group description, which can consist of several sentences or - // paragraphs that describe entry group contents. Default value is an empty - // string. - string description = 3; - - // Output only. Timestamps about this EntryGroup. Default value is empty timestamps. - SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [CreateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate]. -message CreateTagTemplateRequest { - // Required. The name of the project and the template location - // [region](https://cloud.google.com/data-catalog/docs/concepts/regions. - // - // Example: - // - // * projects/{project_id}/locations/us-central1 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. The id of the tag template to create. - string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The tag template to create. - TagTemplate tag_template = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [GetTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate]. -message GetTagTemplateRequest { - // Required. The name of the tag template. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; -} - -// Request message for -// [UpdateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate]. -message UpdateTagTemplateRequest { - // Required. The template to update. The "name" field must be set. - TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED]; - - // The field mask specifies the parts of the template to overwrite. - // - // Allowed fields: - // - // * `display_name` - // - // If absent or empty, all of the allowed fields above will be updated. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate]. -message DeleteTagTemplateRequest { - // Required. The name of the tag template to delete. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. Currently, this field must always be set to `true`. - // This confirms the deletion of any possible tags using this template. - // `force = false` will be supported in the future. - bool force = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [CreateTag][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag]. -message CreateTagRequest { - // Required. The name of the resource to attach this tag to. Tags can be attached to - // Entries. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - // - // Note that this Tag and its child resources may not actually be stored in - // the location in this name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; - - // Required. The tag to create. - Tag tag = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateTag][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag]. -message UpdateTagRequest { - // Required. The updated tag. The "name" field must be set. - Tag tag = 1 [(google.api.field_behavior) = REQUIRED]; - - // The fields to update on the Tag. If absent or empty, all modifiable fields - // are updated. Currently the only modifiable field is the field `fields`. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteTag][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag]. -message DeleteTagRequest { - // Required. The name of the tag to delete. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; -} - -// Request message for -// [CreateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField]. -message CreateTagTemplateFieldRequest { - // Required. The name of the project and the template location - // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - // - // Example: - // - // * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. The ID of the tag template field to create. - // Field ids can contain letters (both uppercase and lowercase), numbers - // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - // character long and at most 128 characters long. Field IDs must also be - // unique within their template. - string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The tag template field to create. - TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField]. -message UpdateTagTemplateFieldRequest { - // Required. The name of the tag template field. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. The template to update. - TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The field mask specifies the parts of the template to be updated. - // Allowed fields: - // - // * `display_name` - // * `type.enum_type` - // * `is_required` - // - // If `update_mask` is not set or empty, all of the allowed fields above will - // be updated. - // - // When updating an enum type, the provided values will be merged with the - // existing values. Therefore, enum values can only be added, existing enum - // values cannot be deleted nor renamed. Updating a template field from - // optional to required is NOT allowed. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [RenameTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField]. -message RenameTagTemplateFieldRequest { - // Required. The name of the tag template. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. The new ID of this tag template field. For example, `my_new_field`. - string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [DeleteTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField]. -message DeleteTagTemplateFieldRequest { - // Required. The name of the tag template field to delete. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. Currently, this field must always be set to `true`. - // This confirms the deletion of this field from any tags using this field. - // `force = false` will be supported in the future. - bool force = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. -message ListTagsRequest { - // Required. The name of the Data Catalog resource to list the tags of. The resource - // could be an [Entry][google.cloud.datacatalog.v1beta1.Entry] or an - // [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. - // - // Examples: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; - - // The maximum number of tags to return. Default is 10. Max limit is 1000. - int32 page_size = 2; - - // Token that specifies which page is requested. If empty, the first page is - // returned. - string page_token = 3; -} - -// Response message for -// [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. -message ListTagsResponse { - // [Tag][google.cloud.datacatalog.v1beta1.Tag] details. - repeated Tag tags = 1; - - // Token to retrieve the next page of results. It is set to empty if no items - // remain in results. - string next_page_token = 2; -} - -// Request message for -// [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. -message ListEntriesRequest { - // Required. The name of the entry group that contains the entries, which can - // be provided in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // The maximum number of items to return. Default is 10. Max limit is 1000. - // Throws an invalid argument for `page_size > 1000`. - int32 page_size = 2; - - // Token that specifies which page is requested. If empty, the first page is - // returned. - string page_token = 3; - - // The fields to return for each Entry. If not set or empty, all - // fields are returned. - // For example, setting read_mask to contain only one path "name" will cause - // ListEntries to return a list of Entries with only "name" field. - google.protobuf.FieldMask read_mask = 4; -} - -// Response message for -// [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. -message ListEntriesResponse { - // Entry details. - repeated Entry entries = 1; - - // Token to retrieve the next page of results. It is set to empty if no items - // remain in results. - string next_page_token = 2; -} - -// Entry resources in Data Catalog can be of different types e.g. a BigQuery -// Table entry is of type `TABLE`. This enum describes all the possible types -// Data Catalog contains. -enum EntryType { - // Default unknown type. - ENTRY_TYPE_UNSPECIFIED = 0; - - // Output only. The type of entry that has a GoogleSQL schema, including - // logical views. - TABLE = 2; - - // Output only. The type of models. - // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro - MODEL = 5; - - // Output only. An entry type which is used for streaming entries. Example: - // Pub/Sub topic. - DATA_STREAM = 3; - - // An entry type which is a set of files or objects. Example: - // Cloud Storage fileset. - FILESET = 4; -} diff --git a/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto b/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto deleted file mode 100644 index c8ca9779..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/cloud/datacatalog/v1beta1/timestamps.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Describes a Cloud Storage fileset entry. -message GcsFilesetSpec { - // Required. Patterns to identify a set of files in Google Cloud Storage. - // See [Cloud Storage - // documentation](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames) - // for more information. Note that bucket wildcards are currently not - // supported. - // - // Examples of valid file_patterns: - // - // * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` - // directory. - // * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` - // spanning all subdirectories. - // * `gs://bucket_name/file*`: matches files prefixed by `file` in - // `bucket_name` - // * `gs://bucket_name/??.txt`: matches files with two characters followed by - // `.txt` in `bucket_name` - // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - // vowel character followed by `.txt` in - // `bucket_name` - // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - // or `m` followed by `.txt` in `bucket_name` - // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - // `a/*/b` pattern, such as `a/c/b`, `a/d/b` - // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - // - // You can combine wildcards to provide more powerful matches, for example: - // - // * `gs://bucket_name/[a-m]??.j*g` - repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Sample files contained in this fileset, not all files contained in this - // fileset are represented here. - repeated GcsFileSpec sample_gcs_file_specs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specifications of a single file in Cloud Storage. -message GcsFileSpec { - // Required. The full file path. Example: `gs://bucket_name/a/b.txt`. - string file_path = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Timestamps about the Cloud Storage file. - SystemTimestamps gcs_timestamps = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The size of the file, in bytes. - int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto b/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto deleted file mode 100644 index 5602bcf1..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.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/datacatalog/v1beta1/timestamps.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "PolicyTagManagerProto"; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// The policy tag manager API service allows clients to manage their taxonomies -// and policy tags. -service PolicyTagManager { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a taxonomy in the specified project. - rpc CreateTaxonomy(CreateTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/taxonomies" - body: "taxonomy" - }; - option (google.api.method_signature) = "parent,taxonomy"; - } - - // Deletes a taxonomy. This operation will also delete all - // policy tags in this taxonomy along with their associated policies. - rpc DeleteTaxonomy(DeleteTaxonomyRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a taxonomy. - rpc UpdateTaxonomy(UpdateTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - patch: "/v1beta1/{taxonomy.name=projects/*/locations/*/taxonomies/*}" - body: "taxonomy" - }; - option (google.api.method_signature) = "taxonomy"; - } - - // Lists all taxonomies in a project in a particular location that the caller - // has permission to view. - rpc ListTaxonomies(ListTaxonomiesRequest) returns (ListTaxonomiesResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/taxonomies" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a taxonomy. - rpc GetTaxonomy(GetTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a policy tag in the specified taxonomy. - rpc CreatePolicyTag(CreatePolicyTagRequest) returns (PolicyTag) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" - body: "policy_tag" - }; - option (google.api.method_signature) = "parent,policy_tag"; - } - - // Deletes a policy tag. Also deletes all of its descendant policy tags. - rpc DeletePolicyTag(DeletePolicyTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a policy tag. - rpc UpdatePolicyTag(UpdatePolicyTagRequest) returns (PolicyTag) { - option (google.api.http) = { - patch: "/v1beta1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}" - body: "policy_tag" - }; - option (google.api.method_signature) = "policy_tag"; - } - - // Lists all policy tags in a taxonomy. - rpc ListPolicyTags(ListPolicyTagsRequest) returns (ListPolicyTagsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a policy tag. - rpc GetPolicyTag(GetPolicyTagRequest) returns (PolicyTag) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets the IAM policy for a taxonomy or a policy tag. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy" - body: "*" - } - }; - } - - // Sets the IAM policy for a taxonomy or a policy tag. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy" - body: "*" - } - }; - } - - // Returns the permissions that a caller has on the specified taxonomy or - // policy tag. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions" - body: "*" - } - }; - } -} - -// A taxonomy is a collection of policy tags that classify data along a common -// axis. For instance a data *sensitivity* taxonomy could contain policy tags -// denoting PII such as age, zipcode, and SSN. A data *origin* taxonomy could -// contain policy tags to distinguish user data, employee data, partner data, -// public data. -message Taxonomy { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Taxonomy" - pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}" - }; - - // Defines policy types where policy tag can be used for. - enum PolicyType { - // Unspecified policy type. - POLICY_TYPE_UNSPECIFIED = 0; - - // Fine grained access control policy, which enables access control on - // tagged resources. - FINE_GRAINED_ACCESS_CONTROL = 1; - } - - // Output only. Resource name of this taxonomy, whose format is: - // "projects/{project_number}/locations/{location_id}/taxonomies/{id}". - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. User defined name of this taxonomy. It must: contain only unicode letters, - // numbers, underscores, dashes and spaces; not start or end with spaces; and - // be at most 200 bytes long when encoded in UTF-8. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description of this taxonomy. It must: contain only unicode characters, - // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes - // long when encoded in UTF-8. If not set, defaults to an empty description. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of policy types that are activated for this taxonomy. If not set, - // defaults to an empty list. - repeated PolicyType activated_policy_types = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined -// in a hierarchy. For example, consider the following hierarchy: -// Geolocation -> (LatLong, City, ZipCode). PolicyTag "Geolocation" -// contains three child policy tags: "LatLong", "City", and "ZipCode". -message PolicyTag { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/PolicyTag" - pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" - }; - - // Output only. Resource name of this policy tag, whose format is: - // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}". - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. User defined name of this policy tag. It must: be unique within the parent - // taxonomy; contain only unicode letters, numbers, underscores, dashes and - // spaces; not start or end with spaces; and be at most 200 bytes long when - // encoded in UTF-8. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Description of this policy tag. It must: contain only unicode characters, - // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes - // long when encoded in UTF-8. If not set, defaults to an empty description. - // If not set, defaults to an empty description. - string description = 3; - - // Resource name of this policy tag's parent policy tag (e.g. for the - // "LatLong" policy tag in the example above, this field contains the - // resource name of the "Geolocation" policy tag). If empty, it means this - // policy tag is a top level policy tag (e.g. this field is empty for the - // "Geolocation" policy tag in the example above). If not set, defaults to an - // empty string. - string parent_policy_tag = 4; - - // Output only. Resource names of child policy tags of this policy tag. - repeated string child_policy_tags = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [CreateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy]. -message CreateTaxonomyRequest { - // Required. Resource name of the project that the taxonomy will belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // The taxonomy to be created. - Taxonomy taxonomy = 2; -} - -// Request message for -// [DeleteTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy]. -message DeleteTaxonomyRequest { - // Required. Resource name of the taxonomy to be deleted. All policy tags in - // this taxonomy will also be deleted. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; -} - -// Request message for -// [UpdateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy]. -message UpdateTaxonomyRequest { - // The taxonomy to update. Only description, display_name, and activated - // policy types can be updated. - Taxonomy taxonomy = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - // If not set, defaults to all of the fields that are allowed to update. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. -message ListTaxonomiesRequest { - // Required. Resource name of the project to list the taxonomies of. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // The maximum number of items to return. Must be a value between 1 and 1000. - // If not set, defaults to 50. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. If - // not set, defaults to an empty string. - string page_token = 3; -} - -// Response message for -// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. -message ListTaxonomiesResponse { - // Taxonomies that the project contains. - repeated Taxonomy taxonomies = 1; - - // Token used to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for -// [GetTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy]. -message GetTaxonomyRequest { - // Required. Resource name of the requested taxonomy. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; -} - -// Request message for -// [CreatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag]. -message CreatePolicyTagRequest { - // Required. Resource name of the taxonomy that the policy tag will belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/PolicyTag" - } - ]; - - // The policy tag to be created. - PolicyTag policy_tag = 2; -} - -// Request message for -// [DeletePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag]. -message DeletePolicyTagRequest { - // Required. Resource name of the policy tag to be deleted. All of its descendant - // policy tags will also be deleted. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/PolicyTag" - } - ]; -} - -// Request message for -// [UpdatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag]. -message UpdatePolicyTagRequest { - // The policy tag to update. Only the description, display_name, and - // parent_policy_tag fields can be updated. - PolicyTag policy_tag = 1; - - // The update mask applies to the resource. Only display_name, description and - // parent_policy_tag can be updated and thus can be listed in the mask. If - // update_mask is not provided, all allowed fields (i.e. display_name, - // description and parent) will be updated. For more information including the - // `FieldMask` definition, see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - // If not set, defaults to all of the fields that are allowed to update. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. -message ListPolicyTagsRequest { - // Required. Resource name of the taxonomy to list the policy tags of. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/PolicyTag" - } - ]; - - // The maximum number of items to return. Must be a value between 1 and 1000. - // If not set, defaults to 50. - int32 page_size = 2; - - // The next_page_token value returned from a previous List request, if any. If - // not set, defaults to an empty string. - string page_token = 3; -} - -// Response message for -// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. -message ListPolicyTagsResponse { - // The policy tags that are in the requested taxonomy. - repeated PolicyTag policy_tags = 1; - - // Token used to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for -// [GetPolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag]. -message GetPolicyTagRequest { - // Required. Resource name of the requested policy tag. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/PolicyTag" - } - ]; -} diff --git a/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto b/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto deleted file mode 100644 index b6e4fb32..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/datacatalog/v1beta1/policytagmanager.proto"; -import "google/iam/v1/policy.proto"; -import "google/api/client.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "PolicyTagManagerSerializationProto"; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Policy tag manager serialization API service allows clients to manipulate -// their taxonomies and policy tags data with serialized format. -service PolicyTagManagerSerialization { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Imports all taxonomies and their policy tags to a project as new - // taxonomies. - // - // This method provides a bulk taxonomy / policy tag creation using nested - // proto structure. - rpc ImportTaxonomies(ImportTaxonomiesRequest) returns (ImportTaxonomiesResponse) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/taxonomies:import" - body: "*" - }; - } - - // Exports all taxonomies and their policy tags in a project. - // - // This method generates SerializedTaxonomy protos with nested policy tags - // that can be used as an input for future ImportTaxonomies calls. - rpc ExportTaxonomies(ExportTaxonomiesRequest) returns (ExportTaxonomiesResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/taxonomies:export" - }; - } -} - -// Message capturing a taxonomy and its policy tag hierarchy as a nested proto. -// Used for taxonomy import/export and mutation. -message SerializedTaxonomy { - // Required. Display name of the taxonomy. Max 200 bytes when encoded in UTF-8. - string display_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Description of the serialized taxonomy. The length of the - // description is limited to 2000 bytes when encoded in UTF-8. If not set, - // defaults to an empty description. - string description = 2; - - // Top level policy tags associated with the taxonomy if any. - repeated SerializedPolicyTag policy_tags = 3; -} - -// Message representing one policy tag when exported as a nested proto. -message SerializedPolicyTag { - // Required. Display name of the policy tag. Max 200 bytes when encoded in UTF-8. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Description of the serialized policy tag. The length of the - // description is limited to 2000 bytes when encoded in UTF-8. If not set, - // defaults to an empty description. - string description = 3; - - // Children of the policy tag if any. - repeated SerializedPolicyTag child_policy_tags = 4; -} - -// Request message for -// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. -message ImportTaxonomiesRequest { - // Required. Resource name of project that the newly created taxonomies will - // belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Required. Source taxonomies to be imported in a tree structure. - oneof source { - // Inline source used for taxonomies import - InlineSource inline_source = 2; - } -} - -// Inline source used for taxonomies import. -message InlineSource { - // Required. Taxonomies to be imported. - repeated SerializedTaxonomy taxonomies = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. -message ImportTaxonomiesResponse { - // Taxonomies that were imported. - repeated Taxonomy taxonomies = 1; -} - -// Request message for -// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. -message ExportTaxonomiesRequest { - // Required. Resource name of the project that taxonomies to be exported - // will share. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Required. Resource names of the taxonomies to be exported. - repeated string taxonomies = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Required. Taxonomies export destination. - oneof destination { - // Export taxonomies as serialized taxonomies. - bool serialized_taxonomies = 3; - } -} - -// Response message for -// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. -message ExportTaxonomiesResponse { - // List of taxonomies and policy tags in a tree structure. - repeated SerializedTaxonomy taxonomies = 1; -} diff --git a/protos/google/cloud/datacatalog/v1beta1/schema.proto b/protos/google/cloud/datacatalog/v1beta1/schema.proto deleted file mode 100644 index d8e69fd4..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/schema.proto +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). -message Schema { - // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be - // specified. - repeated ColumnSchema columns = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Representation of a column within a schema. Columns could be nested inside -// other columns. -message ColumnSchema { - // Required. Name of the column. - string column = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. Type of the column. - string type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description of the column. Default value is an empty string. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A column's mode indicates whether the values in this column are required, - // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported. - // Default mode is `NULLABLE`. - string mode = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Schema of sub-columns. A column can have zero or more sub-columns. - repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/protos/google/cloud/datacatalog/v1beta1/search.proto b/protos/google/cloud/datacatalog/v1beta1/search.proto deleted file mode 100644 index afaa643d..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/search.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1beta1; - -import "google/cloud/datacatalog/v1beta1/common.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// A result that appears in the response of a search request. Each result -// captures details of one entry that matches the search. -message SearchCatalogResult { - // Type of the search result. This field can be used to determine which Get - // method to call to fetch the full resource. - SearchResultType search_result_type = 1; - - // Sub-type of the search result. This is a dot-delimited description of the - // resource's full type, and is the same as the value callers would provide in - // the "type" search facet. Examples: `entry.table`, `entry.dataStream`, - // `tagTemplate`. - string search_result_subtype = 2; - - // The relative resource name of the resource in URL format. - // Examples: - // - // * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` - // * `projects/{project_id}/tagTemplates/{tag_template_id}` - string relative_resource_name = 3; - - // The full name of the cloud resource the entry belongs to. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name. - // Example: - // - // * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId` - string linked_resource = 4; -} - -// The different types of resources that can be returned in search. -enum SearchResultType { - // Default unknown type. - SEARCH_RESULT_TYPE_UNSPECIFIED = 0; - - // An [Entry][google.cloud.datacatalog.v1beta1.Entry]. - ENTRY = 1; - - // A [TagTemplate][google.cloud.datacatalog.v1beta1.TagTemplate]. - TAG_TEMPLATE = 2; - - // An [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. - ENTRY_GROUP = 3; -} diff --git a/protos/google/cloud/datacatalog/v1beta1/table_spec.proto b/protos/google/cloud/datacatalog/v1beta1/table_spec.proto deleted file mode 100644 index c08f43ef..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/table_spec.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Describes a BigQuery table. -message BigQueryTableSpec { - // Output only. The table source type. - TableSourceType table_source_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. - oneof type_spec { - // Table view specification. This field should only be populated if - // `table_source_type` is `BIGQUERY_VIEW`. - ViewSpec view_spec = 2; - - // Spec of a BigQuery table. This field should only be populated if - // `table_source_type` is `BIGQUERY_TABLE`. - TableSpec table_spec = 3; - } -} - -// Table source type. -enum TableSourceType { - // Default unknown type. - TABLE_SOURCE_TYPE_UNSPECIFIED = 0; - - // Table view. - BIGQUERY_VIEW = 2; - - // BigQuery native table. - BIGQUERY_TABLE = 5; -} - -// Table view specification. -message ViewSpec { - // Output only. The query that defines the table view. - string view_query = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Normal BigQuery table spec. -message TableSpec { - // Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`, - // `grouped_entry` is the Data Catalog resource name of the date sharded - // grouped entry, for example, - // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. - // Otherwise, `grouped_entry` is empty. - string grouped_entry = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. -// Context: -// https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding -message BigQueryDateShardedSpec { - // Output only. The Data Catalog resource name of the dataset entry the current table - // belongs to, for example, - // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. - string dataset = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; - - // Output only. The table name prefix of the shards. The name of any given shard is - // `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the - // `table_prefix` is `MyTable`. - string table_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Total number of shards. - int64 shard_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/protos/google/cloud/datacatalog/v1beta1/tags.proto b/protos/google/cloud/datacatalog/v1beta1/tags.proto deleted file mode 100644 index c15fb218..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/tags.proto +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Tags are used to attach custom metadata to Data Catalog resources. Tags -// conform to the specifications within their tag template. -// -// See [Data Catalog -// IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information -// on the permissions needed to create or view tags. -message Tag { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Tag" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" - }; - - // The resource name of the tag in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - // - // where `tag_id` is a system-generated identifier. - // Note that this Tag may not actually be stored in the location in this name. - string name = 1; - - // Required. The resource name of the tag template that this tag uses. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - // - // This field cannot be modified after creation. - string template = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The display name of the tag template. - string template_display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The scope within the parent resource that this tag is attached to. If not - // provided, the tag is attached to the parent resource itself. - // Deleting the scope from the parent resource will delete all tags attached - // to that scope. These fields cannot be updated after creation. - oneof scope { - // Resources like Entry can have schemas associated with them. This scope - // allows users to attach tags to an individual column based on that schema. - // - // For attaching a tag to a nested column, use `.` to separate the column - // names. Example: - // - // * `outer_column.inner_column` - string column = 4; - } - - // Required. This maps the ID of a tag field to the value of and additional information - // about that field. Valid field IDs are defined by the tag's template. A tag - // must have at least 1 field and at most 500 fields. - map fields = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Contains the value and supporting information for a field within -// a [Tag][google.cloud.datacatalog.v1beta1.Tag]. -message TagField { - // Holds an enum value. - message EnumValue { - // The display name of the enum value. - string display_name = 1; - } - - // Output only. The display name of this field. - string display_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The value of this field. - oneof kind { - // Holds the value for a tag field with double type. - double double_value = 2; - - // Holds the value for a tag field with string type. - string string_value = 3; - - // Holds the value for a tag field with boolean type. - bool bool_value = 4; - - // Holds the value for a tag field with timestamp type. - google.protobuf.Timestamp timestamp_value = 5; - - // Holds the value for a tag field with enum type. This value must be - // one of the allowed values in the definition of this enum. - EnumValue enum_value = 6; - } - - // Output only. The order of this field with respect to other fields in this tag. It can be - // set in [Tag][google.cloud.datacatalog.v1beta1.TagTemplateField.order]. For - // example, a higher value can indicate a more important field. The value can - // be negative. Multiple fields can have the same order, and field orders - // within a tag do not have to be sequential. - int32 order = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A tag template defines a tag, which can have one or more typed fields. -// The template is used to create and attach the tag to GCP resources. -// [Tag template -// roles](https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) -// provide permissions to create, edit, and use the template. See, for example, -// the [TagTemplate -// User](https://cloud.google.com/data-catalog/docs/how-to/template-user) role, -// which includes permission to use the tag template to tag resources. -message TagTemplate { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/TagTemplate" - pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}" - }; - - // The resource name of the tag template in URL format. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - // - // Note that this TagTemplate and its child resources may not actually be - // stored in the location in this name. - string name = 1; - - // The display name for this template. Defaults to an empty string. - string display_name = 2; - - // Required. Map of tag template field IDs to the settings for the field. - // This map is an exhaustive list of the allowed fields. This map must contain - // at least one field and at most 500 fields. - // - // The keys to this map are tag template field IDs. Field IDs can contain - // letters (both uppercase and lowercase), numbers (0-9) and underscores (_). - // Field IDs must be at least 1 character long and at most - // 64 characters long. Field IDs must start with a letter or underscore. - map fields = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The template for an individual field within a tag template. -message TagTemplateField { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/TagTemplateField" - pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" - }; - - // Output only. The resource name of the tag template field in URL format. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} - // - // Note that this TagTemplateField may not actually be stored in the location - // in this name. - string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The display name for this field. Defaults to an empty string. - string display_name = 1; - - // Required. The type of value this tag field can contain. - FieldType type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Whether this is a required field. Defaults to false. - bool is_required = 3; - - // The order of this field with respect to other fields in this tag - // template. A higher value indicates a more important field. The value can - // be negative. Multiple fields can have the same order, and field orders - // within a tag do not have to be sequential. - int32 order = 5; -} - -message FieldType { - message EnumType { - message EnumValue { - // Required. The display name of the enum value. Must not be an empty string. - string display_name = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Required on create; optional on update. The set of allowed values for - // this enum. This set must not be empty, the display names of the values in - // this set must not be empty and the display names of the values must be - // case-insensitively unique within this set. Currently, enum values can - // only be added to the list of allowed values. Deletion and renaming of - // enum values are not supported. Can have up to 500 allowed values. - repeated EnumValue allowed_values = 1; - } - - enum PrimitiveType { - // This is the default invalid value for a type. - PRIMITIVE_TYPE_UNSPECIFIED = 0; - - // A double precision number. - DOUBLE = 1; - - // An UTF-8 string. - STRING = 2; - - // A boolean value. - BOOL = 3; - - // A timestamp. - TIMESTAMP = 4; - } - - // Required. - oneof type_decl { - // Represents primitive types - string, bool etc. - PrimitiveType primitive_type = 1; - - // Represents an enum type. - EnumType enum_type = 2; - } -} diff --git a/protos/google/cloud/datacatalog/v1beta1/timestamps.proto b/protos/google/cloud/datacatalog/v1beta1/timestamps.proto deleted file mode 100644 index dc49c75c..00000000 --- a/protos/google/cloud/datacatalog/v1beta1/timestamps.proto +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Timestamps about this resource according to a particular system. -message SystemTimestamps { - // The creation time of the resource within the given system. - google.protobuf.Timestamp create_time = 1; - - // The last-modified time of the resource within the given system. - google.protobuf.Timestamp update_time = 2; - - // Output only. The expiration time of the resource within the given system. - // Currently only apllicable to BigQuery resources. - google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/protos/protos.d.ts b/protos/protos.d.ts deleted file mode 100644 index 533a4e3b..00000000 --- a/protos/protos.d.ts +++ /dev/null @@ -1,27008 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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 datacatalog. */ - namespace datacatalog { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a BigQueryConnectionSpec. */ - interface IBigQueryConnectionSpec { - - /** BigQueryConnectionSpec connectionType */ - connectionType?: (google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType|keyof typeof google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType|null); - - /** BigQueryConnectionSpec cloudSql */ - cloudSql?: (google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec|null); - - /** BigQueryConnectionSpec hasCredential */ - hasCredential?: (boolean|null); - } - - /** Represents a BigQueryConnectionSpec. */ - class BigQueryConnectionSpec implements IBigQueryConnectionSpec { - - /** - * Constructs a new BigQueryConnectionSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IBigQueryConnectionSpec); - - /** BigQueryConnectionSpec connectionType. */ - public connectionType: (google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType|keyof typeof google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType); - - /** BigQueryConnectionSpec cloudSql. */ - public cloudSql?: (google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec|null); - - /** BigQueryConnectionSpec hasCredential. */ - public hasCredential: boolean; - - /** BigQueryConnectionSpec connectionSpec. */ - public connectionSpec?: "cloudSql"; - - /** - * Creates a new BigQueryConnectionSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryConnectionSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IBigQueryConnectionSpec): google.cloud.datacatalog.v1.BigQueryConnectionSpec; - - /** - * Encodes the specified BigQueryConnectionSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryConnectionSpec.verify|verify} messages. - * @param message BigQueryConnectionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IBigQueryConnectionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryConnectionSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryConnectionSpec.verify|verify} messages. - * @param message BigQueryConnectionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IBigQueryConnectionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryConnectionSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.BigQueryConnectionSpec; - - /** - * Decodes a BigQueryConnectionSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.BigQueryConnectionSpec; - - /** - * Verifies a BigQueryConnectionSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryConnectionSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryConnectionSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.BigQueryConnectionSpec; - - /** - * Creates a plain object from a BigQueryConnectionSpec message. Also converts values to other types if specified. - * @param message BigQueryConnectionSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.BigQueryConnectionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryConnectionSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryConnectionSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BigQueryConnectionSpec { - - /** ConnectionType enum. */ - enum ConnectionType { - CONNECTION_TYPE_UNSPECIFIED = 0, - CLOUD_SQL = 1 - } - } - - /** Properties of a CloudSqlBigQueryConnectionSpec. */ - interface ICloudSqlBigQueryConnectionSpec { - - /** CloudSqlBigQueryConnectionSpec instanceId */ - instanceId?: (string|null); - - /** CloudSqlBigQueryConnectionSpec database */ - database?: (string|null); - - /** CloudSqlBigQueryConnectionSpec type */ - type?: (google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType|keyof typeof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType|null); - } - - /** Represents a CloudSqlBigQueryConnectionSpec. */ - class CloudSqlBigQueryConnectionSpec implements ICloudSqlBigQueryConnectionSpec { - - /** - * Constructs a new CloudSqlBigQueryConnectionSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec); - - /** CloudSqlBigQueryConnectionSpec instanceId. */ - public instanceId: string; - - /** CloudSqlBigQueryConnectionSpec database. */ - public database: string; - - /** CloudSqlBigQueryConnectionSpec type. */ - public type: (google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType|keyof typeof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType); - - /** - * Creates a new CloudSqlBigQueryConnectionSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudSqlBigQueryConnectionSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec): google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec; - - /** - * Encodes the specified CloudSqlBigQueryConnectionSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.verify|verify} messages. - * @param message CloudSqlBigQueryConnectionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudSqlBigQueryConnectionSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.verify|verify} messages. - * @param message CloudSqlBigQueryConnectionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudSqlBigQueryConnectionSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudSqlBigQueryConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec; - - /** - * Decodes a CloudSqlBigQueryConnectionSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudSqlBigQueryConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec; - - /** - * Verifies a CloudSqlBigQueryConnectionSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudSqlBigQueryConnectionSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudSqlBigQueryConnectionSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec; - - /** - * Creates a plain object from a CloudSqlBigQueryConnectionSpec message. Also converts values to other types if specified. - * @param message CloudSqlBigQueryConnectionSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudSqlBigQueryConnectionSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudSqlBigQueryConnectionSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CloudSqlBigQueryConnectionSpec { - - /** DatabaseType enum. */ - enum DatabaseType { - DATABASE_TYPE_UNSPECIFIED = 0, - POSTGRES = 1, - MYSQL = 2 - } - } - - /** Properties of a BigQueryRoutineSpec. */ - interface IBigQueryRoutineSpec { - - /** BigQueryRoutineSpec importedLibraries */ - importedLibraries?: (string[]|null); - } - - /** Represents a BigQueryRoutineSpec. */ - class BigQueryRoutineSpec implements IBigQueryRoutineSpec { - - /** - * Constructs a new BigQueryRoutineSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IBigQueryRoutineSpec); - - /** BigQueryRoutineSpec importedLibraries. */ - public importedLibraries: string[]; - - /** - * Creates a new BigQueryRoutineSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryRoutineSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IBigQueryRoutineSpec): google.cloud.datacatalog.v1.BigQueryRoutineSpec; - - /** - * Encodes the specified BigQueryRoutineSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryRoutineSpec.verify|verify} messages. - * @param message BigQueryRoutineSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IBigQueryRoutineSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryRoutineSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryRoutineSpec.verify|verify} messages. - * @param message BigQueryRoutineSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IBigQueryRoutineSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryRoutineSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryRoutineSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.BigQueryRoutineSpec; - - /** - * Decodes a BigQueryRoutineSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryRoutineSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.BigQueryRoutineSpec; - - /** - * Verifies a BigQueryRoutineSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryRoutineSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryRoutineSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.BigQueryRoutineSpec; - - /** - * Creates a plain object from a BigQueryRoutineSpec message. Also converts values to other types if specified. - * @param message BigQueryRoutineSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.BigQueryRoutineSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryRoutineSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryRoutineSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PersonalDetails. */ - interface IPersonalDetails { - - /** PersonalDetails starred */ - starred?: (boolean|null); - - /** PersonalDetails starTime */ - starTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a PersonalDetails. */ - class PersonalDetails implements IPersonalDetails { - - /** - * Constructs a new PersonalDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IPersonalDetails); - - /** PersonalDetails starred. */ - public starred: boolean; - - /** PersonalDetails starTime. */ - public starTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new PersonalDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns PersonalDetails instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IPersonalDetails): google.cloud.datacatalog.v1.PersonalDetails; - - /** - * Encodes the specified PersonalDetails message. Does not implicitly {@link google.cloud.datacatalog.v1.PersonalDetails.verify|verify} messages. - * @param message PersonalDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IPersonalDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PersonalDetails message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PersonalDetails.verify|verify} messages. - * @param message PersonalDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IPersonalDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PersonalDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PersonalDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.PersonalDetails; - - /** - * Decodes a PersonalDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PersonalDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.PersonalDetails; - - /** - * Verifies a PersonalDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PersonalDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PersonalDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.PersonalDetails; - - /** - * Creates a plain object from a PersonalDetails message. Also converts values to other types if specified. - * @param message PersonalDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.PersonalDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PersonalDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PersonalDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** IntegratedSystem enum. */ - enum IntegratedSystem { - INTEGRATED_SYSTEM_UNSPECIFIED = 0, - BIGQUERY = 1, - CLOUD_PUBSUB = 2, - DATAPROC_METASTORE = 3, - DATAPLEX = 4 - } - - /** Properties of a DataSource. */ - interface IDataSource { - - /** DataSource service */ - service?: (google.cloud.datacatalog.v1.DataSource.Service|keyof typeof google.cloud.datacatalog.v1.DataSource.Service|null); - - /** DataSource resource */ - resource?: (string|null); - - /** DataSource sourceEntry */ - sourceEntry?: (string|null); - - /** DataSource storageProperties */ - storageProperties?: (google.cloud.datacatalog.v1.IStorageProperties|null); - } - - /** Represents a DataSource. */ - class DataSource implements IDataSource { - - /** - * Constructs a new DataSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDataSource); - - /** DataSource service. */ - public service: (google.cloud.datacatalog.v1.DataSource.Service|keyof typeof google.cloud.datacatalog.v1.DataSource.Service); - - /** DataSource resource. */ - public resource: string; - - /** DataSource sourceEntry. */ - public sourceEntry: string; - - /** DataSource storageProperties. */ - public storageProperties?: (google.cloud.datacatalog.v1.IStorageProperties|null); - - /** DataSource properties. */ - public properties?: "storageProperties"; - - /** - * Creates a new DataSource instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSource instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDataSource): google.cloud.datacatalog.v1.DataSource; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.datacatalog.v1.DataSource.verify|verify} messages. - * @param message DataSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataSource.verify|verify} messages. - * @param message DataSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DataSource; - - /** - * Decodes a DataSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DataSource; - - /** - * Verifies a DataSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DataSource; - - /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. - * @param message DataSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataSource { - - /** Service enum. */ - enum Service { - SERVICE_UNSPECIFIED = 0, - CLOUD_STORAGE = 1, - BIGQUERY = 2 - } - } - - /** Properties of a StorageProperties. */ - interface IStorageProperties { - - /** StorageProperties filePattern */ - filePattern?: (string[]|null); - - /** StorageProperties fileType */ - fileType?: (string|null); - } - - /** Represents a StorageProperties. */ - class StorageProperties implements IStorageProperties { - - /** - * Constructs a new StorageProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IStorageProperties); - - /** StorageProperties filePattern. */ - public filePattern: string[]; - - /** StorageProperties fileType. */ - public fileType: string; - - /** - * Creates a new StorageProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageProperties instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IStorageProperties): google.cloud.datacatalog.v1.StorageProperties; - - /** - * Encodes the specified StorageProperties message. Does not implicitly {@link google.cloud.datacatalog.v1.StorageProperties.verify|verify} messages. - * @param message StorageProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IStorageProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageProperties message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.StorageProperties.verify|verify} messages. - * @param message StorageProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IStorageProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.StorageProperties; - - /** - * Decodes a StorageProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.StorageProperties; - - /** - * Verifies a StorageProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.StorageProperties; - - /** - * Creates a plain object from a StorageProperties message. Also converts values to other types if specified. - * @param message StorageProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.StorageProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a DataCatalog */ - class DataCatalog extends $protobuf.rpc.Service { - - /** - * Constructs a new DataCatalog 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 DataCatalog 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): DataCatalog; - - /** - * Calls SearchCatalog. - * @param request SearchCatalogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchCatalogResponse - */ - public searchCatalog(request: google.cloud.datacatalog.v1.ISearchCatalogRequest, callback: google.cloud.datacatalog.v1.DataCatalog.SearchCatalogCallback): void; - - /** - * Calls SearchCatalog. - * @param request SearchCatalogRequest message or plain object - * @returns Promise - */ - public searchCatalog(request: google.cloud.datacatalog.v1.ISearchCatalogRequest): Promise; - - /** - * Calls CreateEntryGroup. - * @param request CreateEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryGroup - */ - public createEntryGroup(request: google.cloud.datacatalog.v1.ICreateEntryGroupRequest, callback: google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroupCallback): void; - - /** - * Calls CreateEntryGroup. - * @param request CreateEntryGroupRequest message or plain object - * @returns Promise - */ - public createEntryGroup(request: google.cloud.datacatalog.v1.ICreateEntryGroupRequest): Promise; - - /** - * Calls GetEntryGroup. - * @param request GetEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryGroup - */ - public getEntryGroup(request: google.cloud.datacatalog.v1.IGetEntryGroupRequest, callback: google.cloud.datacatalog.v1.DataCatalog.GetEntryGroupCallback): void; - - /** - * Calls GetEntryGroup. - * @param request GetEntryGroupRequest message or plain object - * @returns Promise - */ - public getEntryGroup(request: google.cloud.datacatalog.v1.IGetEntryGroupRequest): Promise; - - /** - * Calls UpdateEntryGroup. - * @param request UpdateEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryGroup - */ - public updateEntryGroup(request: google.cloud.datacatalog.v1.IUpdateEntryGroupRequest, callback: google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroupCallback): void; - - /** - * Calls UpdateEntryGroup. - * @param request UpdateEntryGroupRequest message or plain object - * @returns Promise - */ - public updateEntryGroup(request: google.cloud.datacatalog.v1.IUpdateEntryGroupRequest): Promise; - - /** - * Calls DeleteEntryGroup. - * @param request DeleteEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteEntryGroup(request: google.cloud.datacatalog.v1.IDeleteEntryGroupRequest, callback: google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroupCallback): void; - - /** - * Calls DeleteEntryGroup. - * @param request DeleteEntryGroupRequest message or plain object - * @returns Promise - */ - public deleteEntryGroup(request: google.cloud.datacatalog.v1.IDeleteEntryGroupRequest): Promise; - - /** - * Calls ListEntryGroups. - * @param request ListEntryGroupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntryGroupsResponse - */ - public listEntryGroups(request: google.cloud.datacatalog.v1.IListEntryGroupsRequest, callback: google.cloud.datacatalog.v1.DataCatalog.ListEntryGroupsCallback): void; - - /** - * Calls ListEntryGroups. - * @param request ListEntryGroupsRequest message or plain object - * @returns Promise - */ - public listEntryGroups(request: google.cloud.datacatalog.v1.IListEntryGroupsRequest): Promise; - - /** - * Calls CreateEntry. - * @param request CreateEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry - */ - public createEntry(request: google.cloud.datacatalog.v1.ICreateEntryRequest, callback: google.cloud.datacatalog.v1.DataCatalog.CreateEntryCallback): void; - - /** - * Calls CreateEntry. - * @param request CreateEntryRequest message or plain object - * @returns Promise - */ - public createEntry(request: google.cloud.datacatalog.v1.ICreateEntryRequest): Promise; - - /** - * Calls UpdateEntry. - * @param request UpdateEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry - */ - public updateEntry(request: google.cloud.datacatalog.v1.IUpdateEntryRequest, callback: google.cloud.datacatalog.v1.DataCatalog.UpdateEntryCallback): void; - - /** - * Calls UpdateEntry. - * @param request UpdateEntryRequest message or plain object - * @returns Promise - */ - public updateEntry(request: google.cloud.datacatalog.v1.IUpdateEntryRequest): Promise; - - /** - * Calls DeleteEntry. - * @param request DeleteEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteEntry(request: google.cloud.datacatalog.v1.IDeleteEntryRequest, callback: google.cloud.datacatalog.v1.DataCatalog.DeleteEntryCallback): void; - - /** - * Calls DeleteEntry. - * @param request DeleteEntryRequest message or plain object - * @returns Promise - */ - public deleteEntry(request: google.cloud.datacatalog.v1.IDeleteEntryRequest): Promise; - - /** - * Calls GetEntry. - * @param request GetEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry - */ - public getEntry(request: google.cloud.datacatalog.v1.IGetEntryRequest, callback: google.cloud.datacatalog.v1.DataCatalog.GetEntryCallback): void; - - /** - * Calls GetEntry. - * @param request GetEntryRequest message or plain object - * @returns Promise - */ - public getEntry(request: google.cloud.datacatalog.v1.IGetEntryRequest): Promise; - - /** - * Calls LookupEntry. - * @param request LookupEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry - */ - public lookupEntry(request: google.cloud.datacatalog.v1.ILookupEntryRequest, callback: google.cloud.datacatalog.v1.DataCatalog.LookupEntryCallback): void; - - /** - * Calls LookupEntry. - * @param request LookupEntryRequest message or plain object - * @returns Promise - */ - public lookupEntry(request: google.cloud.datacatalog.v1.ILookupEntryRequest): Promise; - - /** - * Calls ListEntries. - * @param request ListEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntriesResponse - */ - public listEntries(request: google.cloud.datacatalog.v1.IListEntriesRequest, callback: google.cloud.datacatalog.v1.DataCatalog.ListEntriesCallback): void; - - /** - * Calls ListEntries. - * @param request ListEntriesRequest message or plain object - * @returns Promise - */ - public listEntries(request: google.cloud.datacatalog.v1.IListEntriesRequest): Promise; - - /** - * Calls ModifyEntryOverview. - * @param request ModifyEntryOverviewRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryOverview - */ - public modifyEntryOverview(request: google.cloud.datacatalog.v1.IModifyEntryOverviewRequest, callback: google.cloud.datacatalog.v1.DataCatalog.ModifyEntryOverviewCallback): void; - - /** - * Calls ModifyEntryOverview. - * @param request ModifyEntryOverviewRequest message or plain object - * @returns Promise - */ - public modifyEntryOverview(request: google.cloud.datacatalog.v1.IModifyEntryOverviewRequest): Promise; - - /** - * Calls ModifyEntryContacts. - * @param request ModifyEntryContactsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Contacts - */ - public modifyEntryContacts(request: google.cloud.datacatalog.v1.IModifyEntryContactsRequest, callback: google.cloud.datacatalog.v1.DataCatalog.ModifyEntryContactsCallback): void; - - /** - * Calls ModifyEntryContacts. - * @param request ModifyEntryContactsRequest message or plain object - * @returns Promise - */ - public modifyEntryContacts(request: google.cloud.datacatalog.v1.IModifyEntryContactsRequest): Promise; - - /** - * Calls CreateTagTemplate. - * @param request CreateTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplate - */ - public createTagTemplate(request: google.cloud.datacatalog.v1.ICreateTagTemplateRequest, callback: google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateCallback): void; - - /** - * Calls CreateTagTemplate. - * @param request CreateTagTemplateRequest message or plain object - * @returns Promise - */ - public createTagTemplate(request: google.cloud.datacatalog.v1.ICreateTagTemplateRequest): Promise; - - /** - * Calls GetTagTemplate. - * @param request GetTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplate - */ - public getTagTemplate(request: google.cloud.datacatalog.v1.IGetTagTemplateRequest, callback: google.cloud.datacatalog.v1.DataCatalog.GetTagTemplateCallback): void; - - /** - * Calls GetTagTemplate. - * @param request GetTagTemplateRequest message or plain object - * @returns Promise - */ - public getTagTemplate(request: google.cloud.datacatalog.v1.IGetTagTemplateRequest): Promise; - - /** - * Calls UpdateTagTemplate. - * @param request UpdateTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplate - */ - public updateTagTemplate(request: google.cloud.datacatalog.v1.IUpdateTagTemplateRequest, callback: google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateCallback): void; - - /** - * Calls UpdateTagTemplate. - * @param request UpdateTagTemplateRequest message or plain object - * @returns Promise - */ - public updateTagTemplate(request: google.cloud.datacatalog.v1.IUpdateTagTemplateRequest): Promise; - - /** - * Calls DeleteTagTemplate. - * @param request DeleteTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTagTemplate(request: google.cloud.datacatalog.v1.IDeleteTagTemplateRequest, callback: google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateCallback): void; - - /** - * Calls DeleteTagTemplate. - * @param request DeleteTagTemplateRequest message or plain object - * @returns Promise - */ - public deleteTagTemplate(request: google.cloud.datacatalog.v1.IDeleteTagTemplateRequest): Promise; - - /** - * Calls CreateTagTemplateField. - * @param request CreateTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField - */ - public createTagTemplateField(request: google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateFieldCallback): void; - - /** - * Calls CreateTagTemplateField. - * @param request CreateTagTemplateFieldRequest message or plain object - * @returns Promise - */ - public createTagTemplateField(request: google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest): Promise; - - /** - * Calls UpdateTagTemplateField. - * @param request UpdateTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField - */ - public updateTagTemplateField(request: google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateFieldCallback): void; - - /** - * Calls UpdateTagTemplateField. - * @param request UpdateTagTemplateFieldRequest message or plain object - * @returns Promise - */ - public updateTagTemplateField(request: google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest): Promise; - - /** - * Calls RenameTagTemplateField. - * @param request RenameTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField - */ - public renameTagTemplateField(request: google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldCallback): void; - - /** - * Calls RenameTagTemplateField. - * @param request RenameTagTemplateFieldRequest message or plain object - * @returns Promise - */ - public renameTagTemplateField(request: google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest): Promise; - - /** - * Calls RenameTagTemplateFieldEnumValue. - * @param request RenameTagTemplateFieldEnumValueRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField - */ - public renameTagTemplateFieldEnumValue(request: google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest, callback: google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValueCallback): void; - - /** - * Calls RenameTagTemplateFieldEnumValue. - * @param request RenameTagTemplateFieldEnumValueRequest message or plain object - * @returns Promise - */ - public renameTagTemplateFieldEnumValue(request: google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest): Promise; - - /** - * Calls DeleteTagTemplateField. - * @param request DeleteTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTagTemplateField(request: google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateFieldCallback): void; - - /** - * Calls DeleteTagTemplateField. - * @param request DeleteTagTemplateFieldRequest message or plain object - * @returns Promise - */ - public deleteTagTemplateField(request: google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest): Promise; - - /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag - */ - public createTag(request: google.cloud.datacatalog.v1.ICreateTagRequest, callback: google.cloud.datacatalog.v1.DataCatalog.CreateTagCallback): void; - - /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @returns Promise - */ - public createTag(request: google.cloud.datacatalog.v1.ICreateTagRequest): Promise; - - /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag - */ - public updateTag(request: google.cloud.datacatalog.v1.IUpdateTagRequest, callback: google.cloud.datacatalog.v1.DataCatalog.UpdateTagCallback): void; - - /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @returns Promise - */ - public updateTag(request: google.cloud.datacatalog.v1.IUpdateTagRequest): Promise; - - /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTag(request: google.cloud.datacatalog.v1.IDeleteTagRequest, callback: google.cloud.datacatalog.v1.DataCatalog.DeleteTagCallback): void; - - /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @returns Promise - */ - public deleteTag(request: google.cloud.datacatalog.v1.IDeleteTagRequest): Promise; - - /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTagsResponse - */ - public listTags(request: google.cloud.datacatalog.v1.IListTagsRequest, callback: google.cloud.datacatalog.v1.DataCatalog.ListTagsCallback): void; - - /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @returns Promise - */ - public listTags(request: google.cloud.datacatalog.v1.IListTagsRequest): Promise; - - /** - * Calls StarEntry. - * @param request StarEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StarEntryResponse - */ - public starEntry(request: google.cloud.datacatalog.v1.IStarEntryRequest, callback: google.cloud.datacatalog.v1.DataCatalog.StarEntryCallback): void; - - /** - * Calls StarEntry. - * @param request StarEntryRequest message or plain object - * @returns Promise - */ - public starEntry(request: google.cloud.datacatalog.v1.IStarEntryRequest): Promise; - - /** - * Calls UnstarEntry. - * @param request UnstarEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UnstarEntryResponse - */ - public unstarEntry(request: google.cloud.datacatalog.v1.IUnstarEntryRequest, callback: google.cloud.datacatalog.v1.DataCatalog.UnstarEntryCallback): void; - - /** - * Calls UnstarEntry. - * @param request UnstarEntryRequest message or plain object - * @returns Promise - */ - public unstarEntry(request: google.cloud.datacatalog.v1.IUnstarEntryRequest): Promise; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.datacatalog.v1.DataCatalog.SetIamPolicyCallback): void; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.datacatalog.v1.DataCatalog.GetIamPolicyCallback): void; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.datacatalog.v1.DataCatalog.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace DataCatalog { - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|searchCatalog}. - * @param error Error, if any - * @param [response] SearchCatalogResponse - */ - type SearchCatalogCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.SearchCatalogResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createEntryGroup}. - * @param error Error, if any - * @param [response] EntryGroup - */ - type CreateEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.EntryGroup) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|getEntryGroup}. - * @param error Error, if any - * @param [response] EntryGroup - */ - type GetEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.EntryGroup) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateEntryGroup}. - * @param error Error, if any - * @param [response] EntryGroup - */ - type UpdateEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.EntryGroup) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteEntryGroup}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteEntryGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|listEntryGroups}. - * @param error Error, if any - * @param [response] ListEntryGroupsResponse - */ - type ListEntryGroupsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.ListEntryGroupsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type CreateEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type UpdateEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteEntry}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteEntryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|getEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type GetEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|lookupEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type LookupEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|listEntries}. - * @param error Error, if any - * @param [response] ListEntriesResponse - */ - type ListEntriesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.ListEntriesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|modifyEntryOverview}. - * @param error Error, if any - * @param [response] EntryOverview - */ - type ModifyEntryOverviewCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.EntryOverview) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|modifyEntryContacts}. - * @param error Error, if any - * @param [response] Contacts - */ - type ModifyEntryContactsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Contacts) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createTagTemplate}. - * @param error Error, if any - * @param [response] TagTemplate - */ - type CreateTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.TagTemplate) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|getTagTemplate}. - * @param error Error, if any - * @param [response] TagTemplate - */ - type GetTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.TagTemplate) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateTagTemplate}. - * @param error Error, if any - * @param [response] TagTemplate - */ - type UpdateTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.TagTemplate) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteTagTemplate}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTagTemplateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createTagTemplateField}. - * @param error Error, if any - * @param [response] TagTemplateField - */ - type CreateTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.TagTemplateField) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateTagTemplateField}. - * @param error Error, if any - * @param [response] TagTemplateField - */ - type UpdateTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.TagTemplateField) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|renameTagTemplateField}. - * @param error Error, if any - * @param [response] TagTemplateField - */ - type RenameTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.TagTemplateField) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|renameTagTemplateFieldEnumValue}. - * @param error Error, if any - * @param [response] TagTemplateField - */ - type RenameTagTemplateFieldEnumValueCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.TagTemplateField) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteTagTemplateField}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTagTemplateFieldCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createTag}. - * @param error Error, if any - * @param [response] Tag - */ - type CreateTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Tag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateTag}. - * @param error Error, if any - * @param [response] Tag - */ - type UpdateTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Tag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteTag}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|listTags}. - * @param error Error, if any - * @param [response] ListTagsResponse - */ - type ListTagsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.ListTagsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|starEntry}. - * @param error Error, if any - * @param [response] StarEntryResponse - */ - type StarEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.StarEntryResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|unstarEntry}. - * @param error Error, if any - * @param [response] UnstarEntryResponse - */ - type UnstarEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.UnstarEntryResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a SearchCatalogRequest. */ - interface ISearchCatalogRequest { - - /** SearchCatalogRequest scope */ - scope?: (google.cloud.datacatalog.v1.SearchCatalogRequest.IScope|null); - - /** SearchCatalogRequest query */ - query?: (string|null); - - /** SearchCatalogRequest pageSize */ - pageSize?: (number|null); - - /** SearchCatalogRequest pageToken */ - pageToken?: (string|null); - - /** SearchCatalogRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a SearchCatalogRequest. */ - class SearchCatalogRequest implements ISearchCatalogRequest { - - /** - * Constructs a new SearchCatalogRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ISearchCatalogRequest); - - /** SearchCatalogRequest scope. */ - public scope?: (google.cloud.datacatalog.v1.SearchCatalogRequest.IScope|null); - - /** SearchCatalogRequest query. */ - public query: string; - - /** SearchCatalogRequest pageSize. */ - public pageSize: number; - - /** SearchCatalogRequest pageToken. */ - public pageToken: string; - - /** SearchCatalogRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new SearchCatalogRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchCatalogRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ISearchCatalogRequest): google.cloud.datacatalog.v1.SearchCatalogRequest; - - /** - * Encodes the specified SearchCatalogRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogRequest.verify|verify} messages. - * @param message SearchCatalogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ISearchCatalogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchCatalogRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogRequest.verify|verify} messages. - * @param message SearchCatalogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ISearchCatalogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.SearchCatalogRequest; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.SearchCatalogRequest; - - /** - * Verifies a SearchCatalogRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchCatalogRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchCatalogRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SearchCatalogRequest; - - /** - * Creates a plain object from a SearchCatalogRequest message. Also converts values to other types if specified. - * @param message SearchCatalogRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.SearchCatalogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchCatalogRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchCatalogRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SearchCatalogRequest { - - /** Properties of a Scope. */ - interface IScope { - - /** Scope includeOrgIds */ - includeOrgIds?: (string[]|null); - - /** Scope includeProjectIds */ - includeProjectIds?: (string[]|null); - - /** Scope includeGcpPublicDatasets */ - includeGcpPublicDatasets?: (boolean|null); - - /** Scope restrictedLocations */ - restrictedLocations?: (string[]|null); - - /** Scope starredOnly */ - starredOnly?: (boolean|null); - - /** Scope includePublicTagTemplates */ - includePublicTagTemplates?: (boolean|null); - } - - /** Represents a Scope. */ - class Scope implements IScope { - - /** - * Constructs a new Scope. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.SearchCatalogRequest.IScope); - - /** Scope includeOrgIds. */ - public includeOrgIds: string[]; - - /** Scope includeProjectIds. */ - public includeProjectIds: string[]; - - /** Scope includeGcpPublicDatasets. */ - public includeGcpPublicDatasets: boolean; - - /** Scope restrictedLocations. */ - public restrictedLocations: string[]; - - /** Scope starredOnly. */ - public starredOnly: boolean; - - /** Scope includePublicTagTemplates. */ - public includePublicTagTemplates: boolean; - - /** - * Creates a new Scope instance using the specified properties. - * @param [properties] Properties to set - * @returns Scope instance - */ - public static create(properties?: google.cloud.datacatalog.v1.SearchCatalogRequest.IScope): google.cloud.datacatalog.v1.SearchCatalogRequest.Scope; - - /** - * Encodes the specified Scope message. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.verify|verify} messages. - * @param message Scope message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.SearchCatalogRequest.IScope, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.verify|verify} messages. - * @param message Scope message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.SearchCatalogRequest.IScope, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Scope message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.SearchCatalogRequest.Scope; - - /** - * Decodes a Scope message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.SearchCatalogRequest.Scope; - - /** - * Verifies a Scope message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Scope message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Scope - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SearchCatalogRequest.Scope; - - /** - * Creates a plain object from a Scope message. Also converts values to other types if specified. - * @param message Scope - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.SearchCatalogRequest.Scope, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Scope to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Scope - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SearchCatalogResponse. */ - interface ISearchCatalogResponse { - - /** SearchCatalogResponse results */ - results?: (google.cloud.datacatalog.v1.ISearchCatalogResult[]|null); - - /** SearchCatalogResponse nextPageToken */ - nextPageToken?: (string|null); - - /** SearchCatalogResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a SearchCatalogResponse. */ - class SearchCatalogResponse implements ISearchCatalogResponse { - - /** - * Constructs a new SearchCatalogResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ISearchCatalogResponse); - - /** SearchCatalogResponse results. */ - public results: google.cloud.datacatalog.v1.ISearchCatalogResult[]; - - /** SearchCatalogResponse nextPageToken. */ - public nextPageToken: string; - - /** SearchCatalogResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new SearchCatalogResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchCatalogResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ISearchCatalogResponse): google.cloud.datacatalog.v1.SearchCatalogResponse; - - /** - * Encodes the specified SearchCatalogResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogResponse.verify|verify} messages. - * @param message SearchCatalogResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ISearchCatalogResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchCatalogResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogResponse.verify|verify} messages. - * @param message SearchCatalogResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ISearchCatalogResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchCatalogResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.SearchCatalogResponse; - - /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchCatalogResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.SearchCatalogResponse; - - /** - * Verifies a SearchCatalogResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchCatalogResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchCatalogResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SearchCatalogResponse; - - /** - * Creates a plain object from a SearchCatalogResponse message. Also converts values to other types if specified. - * @param message SearchCatalogResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.SearchCatalogResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchCatalogResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchCatalogResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateEntryGroupRequest. */ - interface ICreateEntryGroupRequest { - - /** CreateEntryGroupRequest parent */ - parent?: (string|null); - - /** CreateEntryGroupRequest entryGroupId */ - entryGroupId?: (string|null); - - /** CreateEntryGroupRequest entryGroup */ - entryGroup?: (google.cloud.datacatalog.v1.IEntryGroup|null); - } - - /** Represents a CreateEntryGroupRequest. */ - class CreateEntryGroupRequest implements ICreateEntryGroupRequest { - - /** - * Constructs a new CreateEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICreateEntryGroupRequest); - - /** CreateEntryGroupRequest parent. */ - public parent: string; - - /** CreateEntryGroupRequest entryGroupId. */ - public entryGroupId: string; - - /** CreateEntryGroupRequest entryGroup. */ - public entryGroup?: (google.cloud.datacatalog.v1.IEntryGroup|null); - - /** - * Creates a new CreateEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEntryGroupRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICreateEntryGroupRequest): google.cloud.datacatalog.v1.CreateEntryGroupRequest; - - /** - * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateEntryGroupRequest.verify|verify} messages. - * @param message CreateEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateEntryGroupRequest.verify|verify} messages. - * @param message CreateEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.CreateEntryGroupRequest; - - /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.CreateEntryGroupRequest; - - /** - * Verifies a CreateEntryGroupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEntryGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CreateEntryGroupRequest; - - /** - * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. - * @param message CreateEntryGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CreateEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEntryGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEntryGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEntryGroupRequest. */ - interface IUpdateEntryGroupRequest { - - /** UpdateEntryGroupRequest entryGroup */ - entryGroup?: (google.cloud.datacatalog.v1.IEntryGroup|null); - - /** UpdateEntryGroupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateEntryGroupRequest. */ - class UpdateEntryGroupRequest implements IUpdateEntryGroupRequest { - - /** - * Constructs a new UpdateEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUpdateEntryGroupRequest); - - /** UpdateEntryGroupRequest entryGroup. */ - public entryGroup?: (google.cloud.datacatalog.v1.IEntryGroup|null); - - /** UpdateEntryGroupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntryGroupRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUpdateEntryGroupRequest): google.cloud.datacatalog.v1.UpdateEntryGroupRequest; - - /** - * Encodes the specified UpdateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateEntryGroupRequest.verify|verify} messages. - * @param message UpdateEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUpdateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateEntryGroupRequest.verify|verify} messages. - * @param message UpdateEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUpdateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEntryGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UpdateEntryGroupRequest; - - /** - * Decodes an UpdateEntryGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UpdateEntryGroupRequest; - - /** - * Verifies an UpdateEntryGroupRequest message. - * @param message Plain 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 UpdateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEntryGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UpdateEntryGroupRequest; - - /** - * Creates a plain object from an UpdateEntryGroupRequest message. Also converts values to other types if specified. - * @param message UpdateEntryGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UpdateEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEntryGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEntryGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEntryGroupRequest. */ - interface IGetEntryGroupRequest { - - /** GetEntryGroupRequest name */ - name?: (string|null); - - /** GetEntryGroupRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a GetEntryGroupRequest. */ - class GetEntryGroupRequest implements IGetEntryGroupRequest { - - /** - * Constructs a new GetEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IGetEntryGroupRequest); - - /** GetEntryGroupRequest name. */ - public name: string; - - /** GetEntryGroupRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new GetEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEntryGroupRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IGetEntryGroupRequest): google.cloud.datacatalog.v1.GetEntryGroupRequest; - - /** - * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetEntryGroupRequest.verify|verify} messages. - * @param message GetEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetEntryGroupRequest.verify|verify} messages. - * @param message GetEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.GetEntryGroupRequest; - - /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.GetEntryGroupRequest; - - /** - * Verifies a GetEntryGroupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEntryGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.GetEntryGroupRequest; - - /** - * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. - * @param message GetEntryGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.GetEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEntryGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEntryGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEntryGroupRequest. */ - interface IDeleteEntryGroupRequest { - - /** DeleteEntryGroupRequest name */ - name?: (string|null); - - /** DeleteEntryGroupRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteEntryGroupRequest. */ - class DeleteEntryGroupRequest implements IDeleteEntryGroupRequest { - - /** - * Constructs a new DeleteEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDeleteEntryGroupRequest); - - /** DeleteEntryGroupRequest name. */ - public name: string; - - /** DeleteEntryGroupRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEntryGroupRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDeleteEntryGroupRequest): google.cloud.datacatalog.v1.DeleteEntryGroupRequest; - - /** - * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteEntryGroupRequest.verify|verify} messages. - * @param message DeleteEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteEntryGroupRequest.verify|verify} messages. - * @param message DeleteEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DeleteEntryGroupRequest; - - /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DeleteEntryGroupRequest; - - /** - * Verifies a DeleteEntryGroupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEntryGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DeleteEntryGroupRequest; - - /** - * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. - * @param message DeleteEntryGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DeleteEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEntryGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEntryGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntryGroupsRequest. */ - interface IListEntryGroupsRequest { - - /** ListEntryGroupsRequest parent */ - parent?: (string|null); - - /** ListEntryGroupsRequest pageSize */ - pageSize?: (number|null); - - /** ListEntryGroupsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListEntryGroupsRequest. */ - class ListEntryGroupsRequest implements IListEntryGroupsRequest { - - /** - * Constructs a new ListEntryGroupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListEntryGroupsRequest); - - /** ListEntryGroupsRequest parent. */ - public parent: string; - - /** ListEntryGroupsRequest pageSize. */ - public pageSize: number; - - /** ListEntryGroupsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListEntryGroupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntryGroupsRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListEntryGroupsRequest): google.cloud.datacatalog.v1.ListEntryGroupsRequest; - - /** - * Encodes the specified ListEntryGroupsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntryGroupsRequest.verify|verify} messages. - * @param message ListEntryGroupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListEntryGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntryGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntryGroupsRequest.verify|verify} messages. - * @param message ListEntryGroupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListEntryGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntryGroupsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntryGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListEntryGroupsRequest; - - /** - * Decodes a ListEntryGroupsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntryGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListEntryGroupsRequest; - - /** - * Verifies a ListEntryGroupsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntryGroupsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntryGroupsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListEntryGroupsRequest; - - /** - * Creates a plain object from a ListEntryGroupsRequest message. Also converts values to other types if specified. - * @param message ListEntryGroupsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListEntryGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntryGroupsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntryGroupsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntryGroupsResponse. */ - interface IListEntryGroupsResponse { - - /** ListEntryGroupsResponse entryGroups */ - entryGroups?: (google.cloud.datacatalog.v1.IEntryGroup[]|null); - - /** ListEntryGroupsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEntryGroupsResponse. */ - class ListEntryGroupsResponse implements IListEntryGroupsResponse { - - /** - * Constructs a new ListEntryGroupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListEntryGroupsResponse); - - /** ListEntryGroupsResponse entryGroups. */ - public entryGroups: google.cloud.datacatalog.v1.IEntryGroup[]; - - /** ListEntryGroupsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEntryGroupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntryGroupsResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListEntryGroupsResponse): google.cloud.datacatalog.v1.ListEntryGroupsResponse; - - /** - * Encodes the specified ListEntryGroupsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntryGroupsResponse.verify|verify} messages. - * @param message ListEntryGroupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListEntryGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntryGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntryGroupsResponse.verify|verify} messages. - * @param message ListEntryGroupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListEntryGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntryGroupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntryGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListEntryGroupsResponse; - - /** - * Decodes a ListEntryGroupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntryGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListEntryGroupsResponse; - - /** - * Verifies a ListEntryGroupsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntryGroupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntryGroupsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListEntryGroupsResponse; - - /** - * Creates a plain object from a ListEntryGroupsResponse message. Also converts values to other types if specified. - * @param message ListEntryGroupsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListEntryGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntryGroupsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntryGroupsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateEntryRequest. */ - interface ICreateEntryRequest { - - /** CreateEntryRequest parent */ - parent?: (string|null); - - /** CreateEntryRequest entryId */ - entryId?: (string|null); - - /** CreateEntryRequest entry */ - entry?: (google.cloud.datacatalog.v1.IEntry|null); - } - - /** Represents a CreateEntryRequest. */ - class CreateEntryRequest implements ICreateEntryRequest { - - /** - * Constructs a new CreateEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICreateEntryRequest); - - /** CreateEntryRequest parent. */ - public parent: string; - - /** CreateEntryRequest entryId. */ - public entryId: string; - - /** CreateEntryRequest entry. */ - public entry?: (google.cloud.datacatalog.v1.IEntry|null); - - /** - * Creates a new CreateEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICreateEntryRequest): google.cloud.datacatalog.v1.CreateEntryRequest; - - /** - * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateEntryRequest.verify|verify} messages. - * @param message CreateEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateEntryRequest.verify|verify} messages. - * @param message CreateEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.CreateEntryRequest; - - /** - * Decodes a CreateEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.CreateEntryRequest; - - /** - * Verifies a CreateEntryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CreateEntryRequest; - - /** - * Creates a plain object from a CreateEntryRequest message. Also converts values to other types if specified. - * @param message CreateEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CreateEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEntryRequest. */ - interface IUpdateEntryRequest { - - /** UpdateEntryRequest entry */ - entry?: (google.cloud.datacatalog.v1.IEntry|null); - - /** UpdateEntryRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateEntryRequest. */ - class UpdateEntryRequest implements IUpdateEntryRequest { - - /** - * Constructs a new UpdateEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUpdateEntryRequest); - - /** UpdateEntryRequest entry. */ - public entry?: (google.cloud.datacatalog.v1.IEntry|null); - - /** UpdateEntryRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUpdateEntryRequest): google.cloud.datacatalog.v1.UpdateEntryRequest; - - /** - * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateEntryRequest.verify|verify} messages. - * @param message UpdateEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateEntryRequest.verify|verify} messages. - * @param message UpdateEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UpdateEntryRequest; - - /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UpdateEntryRequest; - - /** - * Verifies an UpdateEntryRequest message. - * @param message Plain 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 UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UpdateEntryRequest; - - /** - * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. - * @param message UpdateEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UpdateEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEntryRequest. */ - interface IDeleteEntryRequest { - - /** DeleteEntryRequest name */ - name?: (string|null); - } - - /** Represents a DeleteEntryRequest. */ - class DeleteEntryRequest implements IDeleteEntryRequest { - - /** - * Constructs a new DeleteEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDeleteEntryRequest); - - /** DeleteEntryRequest name. */ - public name: string; - - /** - * Creates a new DeleteEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDeleteEntryRequest): google.cloud.datacatalog.v1.DeleteEntryRequest; - - /** - * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteEntryRequest.verify|verify} messages. - * @param message DeleteEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteEntryRequest.verify|verify} messages. - * @param message DeleteEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DeleteEntryRequest; - - /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DeleteEntryRequest; - - /** - * Verifies a DeleteEntryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DeleteEntryRequest; - - /** - * Creates a plain object from a DeleteEntryRequest message. Also converts values to other types if specified. - * @param message DeleteEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DeleteEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEntryRequest. */ - interface IGetEntryRequest { - - /** GetEntryRequest name */ - name?: (string|null); - } - - /** Represents a GetEntryRequest. */ - class GetEntryRequest implements IGetEntryRequest { - - /** - * Constructs a new GetEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IGetEntryRequest); - - /** GetEntryRequest name. */ - public name: string; - - /** - * Creates a new GetEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IGetEntryRequest): google.cloud.datacatalog.v1.GetEntryRequest; - - /** - * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetEntryRequest.verify|verify} messages. - * @param message GetEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetEntryRequest.verify|verify} messages. - * @param message GetEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.GetEntryRequest; - - /** - * Decodes a GetEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.GetEntryRequest; - - /** - * Verifies a GetEntryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.GetEntryRequest; - - /** - * Creates a plain object from a GetEntryRequest message. Also converts values to other types if specified. - * @param message GetEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.GetEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LookupEntryRequest. */ - interface ILookupEntryRequest { - - /** LookupEntryRequest linkedResource */ - linkedResource?: (string|null); - - /** LookupEntryRequest sqlResource */ - sqlResource?: (string|null); - - /** LookupEntryRequest fullyQualifiedName */ - fullyQualifiedName?: (string|null); - } - - /** Represents a LookupEntryRequest. */ - class LookupEntryRequest implements ILookupEntryRequest { - - /** - * Constructs a new LookupEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ILookupEntryRequest); - - /** LookupEntryRequest linkedResource. */ - public linkedResource?: (string|null); - - /** LookupEntryRequest sqlResource. */ - public sqlResource?: (string|null); - - /** LookupEntryRequest fullyQualifiedName. */ - public fullyQualifiedName?: (string|null); - - /** LookupEntryRequest targetName. */ - public targetName?: ("linkedResource"|"sqlResource"|"fullyQualifiedName"); - - /** - * Creates a new LookupEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LookupEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ILookupEntryRequest): google.cloud.datacatalog.v1.LookupEntryRequest; - - /** - * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.LookupEntryRequest.verify|verify} messages. - * @param message LookupEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.LookupEntryRequest.verify|verify} messages. - * @param message LookupEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LookupEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LookupEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.LookupEntryRequest; - - /** - * Decodes a LookupEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LookupEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.LookupEntryRequest; - - /** - * Verifies a LookupEntryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LookupEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LookupEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.LookupEntryRequest; - - /** - * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. - * @param message LookupEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.LookupEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LookupEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LookupEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Entry. */ - interface IEntry { - - /** Entry name */ - name?: (string|null); - - /** Entry linkedResource */ - linkedResource?: (string|null); - - /** Entry fullyQualifiedName */ - fullyQualifiedName?: (string|null); - - /** Entry type */ - type?: (google.cloud.datacatalog.v1.EntryType|keyof typeof google.cloud.datacatalog.v1.EntryType|null); - - /** Entry userSpecifiedType */ - userSpecifiedType?: (string|null); - - /** Entry integratedSystem */ - integratedSystem?: (google.cloud.datacatalog.v1.IntegratedSystem|keyof typeof google.cloud.datacatalog.v1.IntegratedSystem|null); - - /** Entry userSpecifiedSystem */ - userSpecifiedSystem?: (string|null); - - /** Entry gcsFilesetSpec */ - gcsFilesetSpec?: (google.cloud.datacatalog.v1.IGcsFilesetSpec|null); - - /** Entry bigqueryTableSpec */ - bigqueryTableSpec?: (google.cloud.datacatalog.v1.IBigQueryTableSpec|null); - - /** Entry bigqueryDateShardedSpec */ - bigqueryDateShardedSpec?: (google.cloud.datacatalog.v1.IBigQueryDateShardedSpec|null); - - /** Entry databaseTableSpec */ - databaseTableSpec?: (google.cloud.datacatalog.v1.IDatabaseTableSpec|null); - - /** Entry dataSourceConnectionSpec */ - dataSourceConnectionSpec?: (google.cloud.datacatalog.v1.IDataSourceConnectionSpec|null); - - /** Entry routineSpec */ - routineSpec?: (google.cloud.datacatalog.v1.IRoutineSpec|null); - - /** Entry filesetSpec */ - filesetSpec?: (google.cloud.datacatalog.v1.IFilesetSpec|null); - - /** Entry displayName */ - displayName?: (string|null); - - /** Entry description */ - description?: (string|null); - - /** Entry businessContext */ - businessContext?: (google.cloud.datacatalog.v1.IBusinessContext|null); - - /** Entry schema */ - schema?: (google.cloud.datacatalog.v1.ISchema|null); - - /** Entry sourceSystemTimestamps */ - sourceSystemTimestamps?: (google.cloud.datacatalog.v1.ISystemTimestamps|null); - - /** Entry usageSignal */ - usageSignal?: (google.cloud.datacatalog.v1.IUsageSignal|null); - - /** Entry labels */ - labels?: ({ [k: string]: string }|null); - - /** Entry dataSource */ - dataSource?: (google.cloud.datacatalog.v1.IDataSource|null); - - /** Entry personalDetails */ - personalDetails?: (google.cloud.datacatalog.v1.IPersonalDetails|null); - } - - /** Represents an Entry. */ - class Entry implements IEntry { - - /** - * Constructs a new Entry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IEntry); - - /** Entry name. */ - public name: string; - - /** Entry linkedResource. */ - public linkedResource: string; - - /** Entry fullyQualifiedName. */ - public fullyQualifiedName: string; - - /** Entry type. */ - public type?: (google.cloud.datacatalog.v1.EntryType|keyof typeof google.cloud.datacatalog.v1.EntryType|null); - - /** Entry userSpecifiedType. */ - public userSpecifiedType?: (string|null); - - /** Entry integratedSystem. */ - public integratedSystem?: (google.cloud.datacatalog.v1.IntegratedSystem|keyof typeof google.cloud.datacatalog.v1.IntegratedSystem|null); - - /** Entry userSpecifiedSystem. */ - public userSpecifiedSystem?: (string|null); - - /** Entry gcsFilesetSpec. */ - public gcsFilesetSpec?: (google.cloud.datacatalog.v1.IGcsFilesetSpec|null); - - /** Entry bigqueryTableSpec. */ - public bigqueryTableSpec?: (google.cloud.datacatalog.v1.IBigQueryTableSpec|null); - - /** Entry bigqueryDateShardedSpec. */ - public bigqueryDateShardedSpec?: (google.cloud.datacatalog.v1.IBigQueryDateShardedSpec|null); - - /** Entry databaseTableSpec. */ - public databaseTableSpec?: (google.cloud.datacatalog.v1.IDatabaseTableSpec|null); - - /** Entry dataSourceConnectionSpec. */ - public dataSourceConnectionSpec?: (google.cloud.datacatalog.v1.IDataSourceConnectionSpec|null); - - /** Entry routineSpec. */ - public routineSpec?: (google.cloud.datacatalog.v1.IRoutineSpec|null); - - /** Entry filesetSpec. */ - public filesetSpec?: (google.cloud.datacatalog.v1.IFilesetSpec|null); - - /** Entry displayName. */ - public displayName: string; - - /** Entry description. */ - public description: string; - - /** Entry businessContext. */ - public businessContext?: (google.cloud.datacatalog.v1.IBusinessContext|null); - - /** Entry schema. */ - public schema?: (google.cloud.datacatalog.v1.ISchema|null); - - /** Entry sourceSystemTimestamps. */ - public sourceSystemTimestamps?: (google.cloud.datacatalog.v1.ISystemTimestamps|null); - - /** Entry usageSignal. */ - public usageSignal?: (google.cloud.datacatalog.v1.IUsageSignal|null); - - /** Entry labels. */ - public labels: { [k: string]: string }; - - /** Entry dataSource. */ - public dataSource?: (google.cloud.datacatalog.v1.IDataSource|null); - - /** Entry personalDetails. */ - public personalDetails?: (google.cloud.datacatalog.v1.IPersonalDetails|null); - - /** Entry entryType. */ - public entryType?: ("type"|"userSpecifiedType"); - - /** Entry system. */ - public system?: ("integratedSystem"|"userSpecifiedSystem"); - - /** Entry typeSpec. */ - public typeSpec?: ("gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"); - - /** Entry spec. */ - public spec?: ("databaseTableSpec"|"dataSourceConnectionSpec"|"routineSpec"|"filesetSpec"); - - /** - * Creates a new Entry instance using the specified properties. - * @param [properties] Properties to set - * @returns Entry instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IEntry): google.cloud.datacatalog.v1.Entry; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.datacatalog.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.Entry; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.Entry; - - /** - * Verifies an Entry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.Entry; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @param message Entry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Entry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DatabaseTableSpec. */ - interface IDatabaseTableSpec { - - /** DatabaseTableSpec type */ - type?: (google.cloud.datacatalog.v1.DatabaseTableSpec.TableType|keyof typeof google.cloud.datacatalog.v1.DatabaseTableSpec.TableType|null); - - /** DatabaseTableSpec dataplexTable */ - dataplexTable?: (google.cloud.datacatalog.v1.IDataplexTableSpec|null); - } - - /** Represents a DatabaseTableSpec. */ - class DatabaseTableSpec implements IDatabaseTableSpec { - - /** - * Constructs a new DatabaseTableSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDatabaseTableSpec); - - /** DatabaseTableSpec type. */ - public type: (google.cloud.datacatalog.v1.DatabaseTableSpec.TableType|keyof typeof google.cloud.datacatalog.v1.DatabaseTableSpec.TableType); - - /** DatabaseTableSpec dataplexTable. */ - public dataplexTable?: (google.cloud.datacatalog.v1.IDataplexTableSpec|null); - - /** - * Creates a new DatabaseTableSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseTableSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDatabaseTableSpec): google.cloud.datacatalog.v1.DatabaseTableSpec; - - /** - * Encodes the specified DatabaseTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.verify|verify} messages. - * @param message DatabaseTableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDatabaseTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.verify|verify} messages. - * @param message DatabaseTableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDatabaseTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseTableSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DatabaseTableSpec; - - /** - * Decodes a DatabaseTableSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DatabaseTableSpec; - - /** - * Verifies a DatabaseTableSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseTableSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseTableSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DatabaseTableSpec; - - /** - * Creates a plain object from a DatabaseTableSpec message. Also converts values to other types if specified. - * @param message DatabaseTableSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DatabaseTableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseTableSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseTableSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DatabaseTableSpec { - - /** TableType enum. */ - enum TableType { - TABLE_TYPE_UNSPECIFIED = 0, - NATIVE = 1, - EXTERNAL = 2 - } - } - - /** Properties of a FilesetSpec. */ - interface IFilesetSpec { - - /** FilesetSpec dataplexFileset */ - dataplexFileset?: (google.cloud.datacatalog.v1.IDataplexFilesetSpec|null); - } - - /** Represents a FilesetSpec. */ - class FilesetSpec implements IFilesetSpec { - - /** - * Constructs a new FilesetSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IFilesetSpec); - - /** FilesetSpec dataplexFileset. */ - public dataplexFileset?: (google.cloud.datacatalog.v1.IDataplexFilesetSpec|null); - - /** - * Creates a new FilesetSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns FilesetSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IFilesetSpec): google.cloud.datacatalog.v1.FilesetSpec; - - /** - * Encodes the specified FilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.FilesetSpec.verify|verify} messages. - * @param message FilesetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FilesetSpec.verify|verify} messages. - * @param message FilesetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FilesetSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.FilesetSpec; - - /** - * Decodes a FilesetSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.FilesetSpec; - - /** - * Verifies a FilesetSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FilesetSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FilesetSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.FilesetSpec; - - /** - * Creates a plain object from a FilesetSpec message. Also converts values to other types if specified. - * @param message FilesetSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.FilesetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FilesetSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FilesetSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataSourceConnectionSpec. */ - interface IDataSourceConnectionSpec { - - /** DataSourceConnectionSpec bigqueryConnectionSpec */ - bigqueryConnectionSpec?: (google.cloud.datacatalog.v1.IBigQueryConnectionSpec|null); - } - - /** Represents a DataSourceConnectionSpec. */ - class DataSourceConnectionSpec implements IDataSourceConnectionSpec { - - /** - * Constructs a new DataSourceConnectionSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDataSourceConnectionSpec); - - /** DataSourceConnectionSpec bigqueryConnectionSpec. */ - public bigqueryConnectionSpec?: (google.cloud.datacatalog.v1.IBigQueryConnectionSpec|null); - - /** - * Creates a new DataSourceConnectionSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSourceConnectionSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDataSourceConnectionSpec): google.cloud.datacatalog.v1.DataSourceConnectionSpec; - - /** - * Encodes the specified DataSourceConnectionSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DataSourceConnectionSpec.verify|verify} messages. - * @param message DataSourceConnectionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDataSourceConnectionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSourceConnectionSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataSourceConnectionSpec.verify|verify} messages. - * @param message DataSourceConnectionSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDataSourceConnectionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSourceConnectionSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSourceConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DataSourceConnectionSpec; - - /** - * Decodes a DataSourceConnectionSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSourceConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DataSourceConnectionSpec; - - /** - * Verifies a DataSourceConnectionSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSourceConnectionSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSourceConnectionSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DataSourceConnectionSpec; - - /** - * Creates a plain object from a DataSourceConnectionSpec message. Also converts values to other types if specified. - * @param message DataSourceConnectionSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DataSourceConnectionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSourceConnectionSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSourceConnectionSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RoutineSpec. */ - interface IRoutineSpec { - - /** RoutineSpec routineType */ - routineType?: (google.cloud.datacatalog.v1.RoutineSpec.RoutineType|keyof typeof google.cloud.datacatalog.v1.RoutineSpec.RoutineType|null); - - /** RoutineSpec language */ - language?: (string|null); - - /** RoutineSpec routineArguments */ - routineArguments?: (google.cloud.datacatalog.v1.RoutineSpec.IArgument[]|null); - - /** RoutineSpec returnType */ - returnType?: (string|null); - - /** RoutineSpec definitionBody */ - definitionBody?: (string|null); - - /** RoutineSpec bigqueryRoutineSpec */ - bigqueryRoutineSpec?: (google.cloud.datacatalog.v1.IBigQueryRoutineSpec|null); - } - - /** Represents a RoutineSpec. */ - class RoutineSpec implements IRoutineSpec { - - /** - * Constructs a new RoutineSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IRoutineSpec); - - /** RoutineSpec routineType. */ - public routineType: (google.cloud.datacatalog.v1.RoutineSpec.RoutineType|keyof typeof google.cloud.datacatalog.v1.RoutineSpec.RoutineType); - - /** RoutineSpec language. */ - public language: string; - - /** RoutineSpec routineArguments. */ - public routineArguments: google.cloud.datacatalog.v1.RoutineSpec.IArgument[]; - - /** RoutineSpec returnType. */ - public returnType: string; - - /** RoutineSpec definitionBody. */ - public definitionBody: string; - - /** RoutineSpec bigqueryRoutineSpec. */ - public bigqueryRoutineSpec?: (google.cloud.datacatalog.v1.IBigQueryRoutineSpec|null); - - /** RoutineSpec systemSpec. */ - public systemSpec?: "bigqueryRoutineSpec"; - - /** - * Creates a new RoutineSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns RoutineSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IRoutineSpec): google.cloud.datacatalog.v1.RoutineSpec; - - /** - * Encodes the specified RoutineSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.RoutineSpec.verify|verify} messages. - * @param message RoutineSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IRoutineSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RoutineSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RoutineSpec.verify|verify} messages. - * @param message RoutineSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IRoutineSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RoutineSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RoutineSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.RoutineSpec; - - /** - * Decodes a RoutineSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RoutineSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.RoutineSpec; - - /** - * Verifies a RoutineSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RoutineSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RoutineSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.RoutineSpec; - - /** - * Creates a plain object from a RoutineSpec message. Also converts values to other types if specified. - * @param message RoutineSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.RoutineSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RoutineSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RoutineSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RoutineSpec { - - /** RoutineType enum. */ - enum RoutineType { - ROUTINE_TYPE_UNSPECIFIED = 0, - SCALAR_FUNCTION = 1, - PROCEDURE = 2 - } - - /** Properties of an Argument. */ - interface IArgument { - - /** Argument name */ - name?: (string|null); - - /** Argument mode */ - mode?: (google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode|keyof typeof google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode|null); - - /** Argument type */ - type?: (string|null); - } - - /** Represents an Argument. */ - class Argument implements IArgument { - - /** - * Constructs a new Argument. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.RoutineSpec.IArgument); - - /** Argument name. */ - public name: string; - - /** Argument mode. */ - public mode: (google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode|keyof typeof google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode); - - /** Argument type. */ - public type: string; - - /** - * Creates a new Argument instance using the specified properties. - * @param [properties] Properties to set - * @returns Argument instance - */ - public static create(properties?: google.cloud.datacatalog.v1.RoutineSpec.IArgument): google.cloud.datacatalog.v1.RoutineSpec.Argument; - - /** - * Encodes the specified Argument message. Does not implicitly {@link google.cloud.datacatalog.v1.RoutineSpec.Argument.verify|verify} messages. - * @param message Argument message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.RoutineSpec.IArgument, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Argument message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RoutineSpec.Argument.verify|verify} messages. - * @param message Argument message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.RoutineSpec.IArgument, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Argument message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Argument - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.RoutineSpec.Argument; - - /** - * Decodes an Argument message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Argument - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.RoutineSpec.Argument; - - /** - * Verifies an Argument message. - * @param message Plain 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 Argument message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Argument - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.RoutineSpec.Argument; - - /** - * Creates a plain object from an Argument message. Also converts values to other types if specified. - * @param message Argument - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.RoutineSpec.Argument, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Argument to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Argument - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Argument { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - IN = 1, - OUT = 2, - INOUT = 3 - } - } - } - - /** Properties of a BusinessContext. */ - interface IBusinessContext { - - /** BusinessContext entryOverview */ - entryOverview?: (google.cloud.datacatalog.v1.IEntryOverview|null); - - /** BusinessContext contacts */ - contacts?: (google.cloud.datacatalog.v1.IContacts|null); - } - - /** Represents a BusinessContext. */ - class BusinessContext implements IBusinessContext { - - /** - * Constructs a new BusinessContext. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IBusinessContext); - - /** BusinessContext entryOverview. */ - public entryOverview?: (google.cloud.datacatalog.v1.IEntryOverview|null); - - /** BusinessContext contacts. */ - public contacts?: (google.cloud.datacatalog.v1.IContacts|null); - - /** - * Creates a new BusinessContext instance using the specified properties. - * @param [properties] Properties to set - * @returns BusinessContext instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IBusinessContext): google.cloud.datacatalog.v1.BusinessContext; - - /** - * Encodes the specified BusinessContext message. Does not implicitly {@link google.cloud.datacatalog.v1.BusinessContext.verify|verify} messages. - * @param message BusinessContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IBusinessContext, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BusinessContext message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BusinessContext.verify|verify} messages. - * @param message BusinessContext message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IBusinessContext, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BusinessContext message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BusinessContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.BusinessContext; - - /** - * Decodes a BusinessContext message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BusinessContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.BusinessContext; - - /** - * Verifies a BusinessContext message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BusinessContext message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BusinessContext - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.BusinessContext; - - /** - * Creates a plain object from a BusinessContext message. Also converts values to other types if specified. - * @param message BusinessContext - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.BusinessContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BusinessContext to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BusinessContext - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EntryOverview. */ - interface IEntryOverview { - - /** EntryOverview overview */ - overview?: (string|null); - } - - /** Represents an EntryOverview. */ - class EntryOverview implements IEntryOverview { - - /** - * Constructs a new EntryOverview. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IEntryOverview); - - /** EntryOverview overview. */ - public overview: string; - - /** - * Creates a new EntryOverview instance using the specified properties. - * @param [properties] Properties to set - * @returns EntryOverview instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IEntryOverview): google.cloud.datacatalog.v1.EntryOverview; - - /** - * Encodes the specified EntryOverview message. Does not implicitly {@link google.cloud.datacatalog.v1.EntryOverview.verify|verify} messages. - * @param message EntryOverview message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IEntryOverview, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EntryOverview message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.EntryOverview.verify|verify} messages. - * @param message EntryOverview message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IEntryOverview, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EntryOverview message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntryOverview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.EntryOverview; - - /** - * Decodes an EntryOverview message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntryOverview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.EntryOverview; - - /** - * Verifies an EntryOverview message. - * @param message Plain 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 EntryOverview message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntryOverview - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.EntryOverview; - - /** - * Creates a plain object from an EntryOverview message. Also converts values to other types if specified. - * @param message EntryOverview - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.EntryOverview, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EntryOverview to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EntryOverview - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Contacts. */ - interface IContacts { - - /** Contacts people */ - people?: (google.cloud.datacatalog.v1.Contacts.IPerson[]|null); - } - - /** Represents a Contacts. */ - class Contacts implements IContacts { - - /** - * Constructs a new Contacts. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IContacts); - - /** Contacts people. */ - public people: google.cloud.datacatalog.v1.Contacts.IPerson[]; - - /** - * Creates a new Contacts instance using the specified properties. - * @param [properties] Properties to set - * @returns Contacts instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IContacts): google.cloud.datacatalog.v1.Contacts; - - /** - * Encodes the specified Contacts message. Does not implicitly {@link google.cloud.datacatalog.v1.Contacts.verify|verify} messages. - * @param message Contacts message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IContacts, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Contacts message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Contacts.verify|verify} messages. - * @param message Contacts message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IContacts, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Contacts message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Contacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.Contacts; - - /** - * Decodes a Contacts message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Contacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.Contacts; - - /** - * Verifies a Contacts message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Contacts message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Contacts - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.Contacts; - - /** - * Creates a plain object from a Contacts message. Also converts values to other types if specified. - * @param message Contacts - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.Contacts, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Contacts to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Contacts - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Contacts { - - /** Properties of a Person. */ - interface IPerson { - - /** Person designation */ - designation?: (string|null); - - /** Person email */ - email?: (string|null); - } - - /** Represents a Person. */ - class Person implements IPerson { - - /** - * Constructs a new Person. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.Contacts.IPerson); - - /** Person designation. */ - public designation: string; - - /** Person email. */ - public email: string; - - /** - * Creates a new Person instance using the specified properties. - * @param [properties] Properties to set - * @returns Person instance - */ - public static create(properties?: google.cloud.datacatalog.v1.Contacts.IPerson): google.cloud.datacatalog.v1.Contacts.Person; - - /** - * Encodes the specified Person message. Does not implicitly {@link google.cloud.datacatalog.v1.Contacts.Person.verify|verify} messages. - * @param message Person message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.Contacts.IPerson, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Person message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Contacts.Person.verify|verify} messages. - * @param message Person message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.Contacts.IPerson, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Person message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Person - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.Contacts.Person; - - /** - * Decodes a Person message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Person - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.Contacts.Person; - - /** - * Verifies a Person message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Person message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Person - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.Contacts.Person; - - /** - * Creates a plain object from a Person message. Also converts values to other types if specified. - * @param message Person - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.Contacts.Person, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Person to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Person - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EntryGroup. */ - interface IEntryGroup { - - /** EntryGroup name */ - name?: (string|null); - - /** EntryGroup displayName */ - displayName?: (string|null); - - /** EntryGroup description */ - description?: (string|null); - - /** EntryGroup dataCatalogTimestamps */ - dataCatalogTimestamps?: (google.cloud.datacatalog.v1.ISystemTimestamps|null); - } - - /** Represents an EntryGroup. */ - class EntryGroup implements IEntryGroup { - - /** - * Constructs a new EntryGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IEntryGroup); - - /** EntryGroup name. */ - public name: string; - - /** EntryGroup displayName. */ - public displayName: string; - - /** EntryGroup description. */ - public description: string; - - /** EntryGroup dataCatalogTimestamps. */ - public dataCatalogTimestamps?: (google.cloud.datacatalog.v1.ISystemTimestamps|null); - - /** - * Creates a new EntryGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns EntryGroup instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IEntryGroup): google.cloud.datacatalog.v1.EntryGroup; - - /** - * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.datacatalog.v1.EntryGroup.verify|verify} messages. - * @param message EntryGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.EntryGroup.verify|verify} messages. - * @param message EntryGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EntryGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.EntryGroup; - - /** - * Decodes an EntryGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.EntryGroup; - - /** - * Verifies an EntryGroup message. - * @param message Plain 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 EntryGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntryGroup - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.EntryGroup; - - /** - * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. - * @param message EntryGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.EntryGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EntryGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EntryGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTagTemplateRequest. */ - interface ICreateTagTemplateRequest { - - /** CreateTagTemplateRequest parent */ - parent?: (string|null); - - /** CreateTagTemplateRequest tagTemplateId */ - tagTemplateId?: (string|null); - - /** CreateTagTemplateRequest tagTemplate */ - tagTemplate?: (google.cloud.datacatalog.v1.ITagTemplate|null); - } - - /** Represents a CreateTagTemplateRequest. */ - class CreateTagTemplateRequest implements ICreateTagTemplateRequest { - - /** - * Constructs a new CreateTagTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICreateTagTemplateRequest); - - /** CreateTagTemplateRequest parent. */ - public parent: string; - - /** CreateTagTemplateRequest tagTemplateId. */ - public tagTemplateId: string; - - /** CreateTagTemplateRequest tagTemplate. */ - public tagTemplate?: (google.cloud.datacatalog.v1.ITagTemplate|null); - - /** - * Creates a new CreateTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagTemplateRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICreateTagTemplateRequest): google.cloud.datacatalog.v1.CreateTagTemplateRequest; - - /** - * Encodes the specified CreateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagTemplateRequest.verify|verify} messages. - * @param message CreateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICreateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagTemplateRequest.verify|verify} messages. - * @param message CreateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICreateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.CreateTagTemplateRequest; - - /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.CreateTagTemplateRequest; - - /** - * Verifies a CreateTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CreateTagTemplateRequest; - - /** - * Creates a plain object from a CreateTagTemplateRequest message. Also converts values to other types if specified. - * @param message CreateTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CreateTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTagTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTagTemplateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTagTemplateRequest. */ - interface IGetTagTemplateRequest { - - /** GetTagTemplateRequest name */ - name?: (string|null); - } - - /** Represents a GetTagTemplateRequest. */ - class GetTagTemplateRequest implements IGetTagTemplateRequest { - - /** - * Constructs a new GetTagTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IGetTagTemplateRequest); - - /** GetTagTemplateRequest name. */ - public name: string; - - /** - * Creates a new GetTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTagTemplateRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IGetTagTemplateRequest): google.cloud.datacatalog.v1.GetTagTemplateRequest; - - /** - * Encodes the specified GetTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetTagTemplateRequest.verify|verify} messages. - * @param message GetTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IGetTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetTagTemplateRequest.verify|verify} messages. - * @param message GetTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IGetTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.GetTagTemplateRequest; - - /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.GetTagTemplateRequest; - - /** - * Verifies a GetTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTagTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.GetTagTemplateRequest; - - /** - * Creates a plain object from a GetTagTemplateRequest message. Also converts values to other types if specified. - * @param message GetTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.GetTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTagTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetTagTemplateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTagTemplateRequest. */ - interface IUpdateTagTemplateRequest { - - /** UpdateTagTemplateRequest tagTemplate */ - tagTemplate?: (google.cloud.datacatalog.v1.ITagTemplate|null); - - /** UpdateTagTemplateRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTagTemplateRequest. */ - class UpdateTagTemplateRequest implements IUpdateTagTemplateRequest { - - /** - * Constructs a new UpdateTagTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUpdateTagTemplateRequest); - - /** UpdateTagTemplateRequest tagTemplate. */ - public tagTemplate?: (google.cloud.datacatalog.v1.ITagTemplate|null); - - /** UpdateTagTemplateRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTagTemplateRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUpdateTagTemplateRequest): google.cloud.datacatalog.v1.UpdateTagTemplateRequest; - - /** - * Encodes the specified UpdateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagTemplateRequest.verify|verify} messages. - * @param message UpdateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUpdateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagTemplateRequest.verify|verify} messages. - * @param message UpdateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUpdateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UpdateTagTemplateRequest; - - /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UpdateTagTemplateRequest; - - /** - * Verifies an UpdateTagTemplateRequest message. - * @param message Plain 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 UpdateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTagTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UpdateTagTemplateRequest; - - /** - * Creates a plain object from an UpdateTagTemplateRequest message. Also converts values to other types if specified. - * @param message UpdateTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UpdateTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTagTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTagTemplateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTagTemplateRequest. */ - interface IDeleteTagTemplateRequest { - - /** DeleteTagTemplateRequest name */ - name?: (string|null); - - /** DeleteTagTemplateRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteTagTemplateRequest. */ - class DeleteTagTemplateRequest implements IDeleteTagTemplateRequest { - - /** - * Constructs a new DeleteTagTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDeleteTagTemplateRequest); - - /** DeleteTagTemplateRequest name. */ - public name: string; - - /** DeleteTagTemplateRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTagTemplateRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDeleteTagTemplateRequest): google.cloud.datacatalog.v1.DeleteTagTemplateRequest; - - /** - * Encodes the specified DeleteTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagTemplateRequest.verify|verify} messages. - * @param message DeleteTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDeleteTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagTemplateRequest.verify|verify} messages. - * @param message DeleteTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDeleteTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DeleteTagTemplateRequest; - - /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DeleteTagTemplateRequest; - - /** - * Verifies a DeleteTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTagTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DeleteTagTemplateRequest; - - /** - * Creates a plain object from a DeleteTagTemplateRequest message. Also converts values to other types if specified. - * @param message DeleteTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DeleteTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTagTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTagTemplateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTagRequest. */ - interface ICreateTagRequest { - - /** CreateTagRequest parent */ - parent?: (string|null); - - /** CreateTagRequest tag */ - tag?: (google.cloud.datacatalog.v1.ITag|null); - } - - /** Represents a CreateTagRequest. */ - class CreateTagRequest implements ICreateTagRequest { - - /** - * Constructs a new CreateTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICreateTagRequest); - - /** CreateTagRequest parent. */ - public parent: string; - - /** CreateTagRequest tag. */ - public tag?: (google.cloud.datacatalog.v1.ITag|null); - - /** - * Creates a new CreateTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICreateTagRequest): google.cloud.datacatalog.v1.CreateTagRequest; - - /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.CreateTagRequest; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.CreateTagRequest; - - /** - * Verifies a CreateTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CreateTagRequest; - - /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. - * @param message CreateTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTagRequest. */ - interface IUpdateTagRequest { - - /** UpdateTagRequest tag */ - tag?: (google.cloud.datacatalog.v1.ITag|null); - - /** UpdateTagRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTagRequest. */ - class UpdateTagRequest implements IUpdateTagRequest { - - /** - * Constructs a new UpdateTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUpdateTagRequest); - - /** UpdateTagRequest tag. */ - public tag?: (google.cloud.datacatalog.v1.ITag|null); - - /** UpdateTagRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUpdateTagRequest): google.cloud.datacatalog.v1.UpdateTagRequest; - - /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UpdateTagRequest; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UpdateTagRequest; - - /** - * Verifies an UpdateTagRequest message. - * @param message Plain 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 UpdateTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UpdateTagRequest; - - /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. - * @param message UpdateTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTagRequest. */ - interface IDeleteTagRequest { - - /** DeleteTagRequest name */ - name?: (string|null); - } - - /** Represents a DeleteTagRequest. */ - class DeleteTagRequest implements IDeleteTagRequest { - - /** - * Constructs a new DeleteTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDeleteTagRequest); - - /** DeleteTagRequest name. */ - public name: string; - - /** - * Creates a new DeleteTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDeleteTagRequest): google.cloud.datacatalog.v1.DeleteTagRequest; - - /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DeleteTagRequest; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DeleteTagRequest; - - /** - * Verifies a DeleteTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DeleteTagRequest; - - /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. - * @param message DeleteTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTagTemplateFieldRequest. */ - interface ICreateTagTemplateFieldRequest { - - /** CreateTagTemplateFieldRequest parent */ - parent?: (string|null); - - /** CreateTagTemplateFieldRequest tagTemplateFieldId */ - tagTemplateFieldId?: (string|null); - - /** CreateTagTemplateFieldRequest tagTemplateField */ - tagTemplateField?: (google.cloud.datacatalog.v1.ITagTemplateField|null); - } - - /** Represents a CreateTagTemplateFieldRequest. */ - class CreateTagTemplateFieldRequest implements ICreateTagTemplateFieldRequest { - - /** - * Constructs a new CreateTagTemplateFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest); - - /** CreateTagTemplateFieldRequest parent. */ - public parent: string; - - /** CreateTagTemplateFieldRequest tagTemplateFieldId. */ - public tagTemplateFieldId: string; - - /** CreateTagTemplateFieldRequest tagTemplateField. */ - public tagTemplateField?: (google.cloud.datacatalog.v1.ITagTemplateField|null); - - /** - * Creates a new CreateTagTemplateFieldRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagTemplateFieldRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest): google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest; - - /** - * Encodes the specified CreateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @param message CreateTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @param message CreateTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest; - - /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest; - - /** - * Verifies a CreateTagTemplateFieldRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagTemplateFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest; - - /** - * Creates a plain object from a CreateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message CreateTagTemplateFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTagTemplateFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTagTemplateFieldRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTagTemplateFieldRequest. */ - interface IUpdateTagTemplateFieldRequest { - - /** UpdateTagTemplateFieldRequest name */ - name?: (string|null); - - /** UpdateTagTemplateFieldRequest tagTemplateField */ - tagTemplateField?: (google.cloud.datacatalog.v1.ITagTemplateField|null); - - /** UpdateTagTemplateFieldRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTagTemplateFieldRequest. */ - class UpdateTagTemplateFieldRequest implements IUpdateTagTemplateFieldRequest { - - /** - * Constructs a new UpdateTagTemplateFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest); - - /** UpdateTagTemplateFieldRequest name. */ - public name: string; - - /** UpdateTagTemplateFieldRequest tagTemplateField. */ - public tagTemplateField?: (google.cloud.datacatalog.v1.ITagTemplateField|null); - - /** UpdateTagTemplateFieldRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTagTemplateFieldRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTagTemplateFieldRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest): google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest; - - /** - * Encodes the specified UpdateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @param message UpdateTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @param message UpdateTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest; - - /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest; - - /** - * Verifies an UpdateTagTemplateFieldRequest message. - * @param message Plain 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 UpdateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTagTemplateFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest; - - /** - * Creates a plain object from an UpdateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message UpdateTagTemplateFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTagTemplateFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTagTemplateFieldRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RenameTagTemplateFieldRequest. */ - interface IRenameTagTemplateFieldRequest { - - /** RenameTagTemplateFieldRequest name */ - name?: (string|null); - - /** RenameTagTemplateFieldRequest newTagTemplateFieldId */ - newTagTemplateFieldId?: (string|null); - } - - /** Represents a RenameTagTemplateFieldRequest. */ - class RenameTagTemplateFieldRequest implements IRenameTagTemplateFieldRequest { - - /** - * Constructs a new RenameTagTemplateFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest); - - /** RenameTagTemplateFieldRequest name. */ - public name: string; - - /** RenameTagTemplateFieldRequest newTagTemplateFieldId. */ - public newTagTemplateFieldId: string; - - /** - * Creates a new RenameTagTemplateFieldRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RenameTagTemplateFieldRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest): google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; - - /** - * Encodes the specified RenameTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @param message RenameTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RenameTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @param message RenameTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; - - /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; - - /** - * Verifies a RenameTagTemplateFieldRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RenameTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RenameTagTemplateFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest; - - /** - * Creates a plain object from a RenameTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message RenameTagTemplateFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RenameTagTemplateFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RenameTagTemplateFieldRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RenameTagTemplateFieldEnumValueRequest. */ - interface IRenameTagTemplateFieldEnumValueRequest { - - /** RenameTagTemplateFieldEnumValueRequest name */ - name?: (string|null); - - /** RenameTagTemplateFieldEnumValueRequest newEnumValueDisplayName */ - newEnumValueDisplayName?: (string|null); - } - - /** Represents a RenameTagTemplateFieldEnumValueRequest. */ - class RenameTagTemplateFieldEnumValueRequest implements IRenameTagTemplateFieldEnumValueRequest { - - /** - * Constructs a new RenameTagTemplateFieldEnumValueRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest); - - /** RenameTagTemplateFieldEnumValueRequest name. */ - public name: string; - - /** RenameTagTemplateFieldEnumValueRequest newEnumValueDisplayName. */ - public newEnumValueDisplayName: string; - - /** - * Creates a new RenameTagTemplateFieldEnumValueRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RenameTagTemplateFieldEnumValueRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest): google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest; - - /** - * Encodes the specified RenameTagTemplateFieldEnumValueRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.verify|verify} messages. - * @param message RenameTagTemplateFieldEnumValueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RenameTagTemplateFieldEnumValueRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.verify|verify} messages. - * @param message RenameTagTemplateFieldEnumValueRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RenameTagTemplateFieldEnumValueRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RenameTagTemplateFieldEnumValueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest; - - /** - * Decodes a RenameTagTemplateFieldEnumValueRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RenameTagTemplateFieldEnumValueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest; - - /** - * Verifies a RenameTagTemplateFieldEnumValueRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RenameTagTemplateFieldEnumValueRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RenameTagTemplateFieldEnumValueRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest; - - /** - * Creates a plain object from a RenameTagTemplateFieldEnumValueRequest message. Also converts values to other types if specified. - * @param message RenameTagTemplateFieldEnumValueRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RenameTagTemplateFieldEnumValueRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RenameTagTemplateFieldEnumValueRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTagTemplateFieldRequest. */ - interface IDeleteTagTemplateFieldRequest { - - /** DeleteTagTemplateFieldRequest name */ - name?: (string|null); - - /** DeleteTagTemplateFieldRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteTagTemplateFieldRequest. */ - class DeleteTagTemplateFieldRequest implements IDeleteTagTemplateFieldRequest { - - /** - * Constructs a new DeleteTagTemplateFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest); - - /** DeleteTagTemplateFieldRequest name. */ - public name: string; - - /** DeleteTagTemplateFieldRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteTagTemplateFieldRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTagTemplateFieldRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest): google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest; - - /** - * Encodes the specified DeleteTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @param message DeleteTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @param message DeleteTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest; - - /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest; - - /** - * Verifies a DeleteTagTemplateFieldRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTagTemplateFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest; - - /** - * Creates a plain object from a DeleteTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message DeleteTagTemplateFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTagTemplateFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTagTemplateFieldRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTagsRequest. */ - interface IListTagsRequest { - - /** ListTagsRequest parent */ - parent?: (string|null); - - /** ListTagsRequest pageSize */ - pageSize?: (number|null); - - /** ListTagsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListTagsRequest. */ - class ListTagsRequest implements IListTagsRequest { - - /** - * Constructs a new ListTagsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListTagsRequest); - - /** ListTagsRequest parent. */ - public parent: string; - - /** ListTagsRequest pageSize. */ - public pageSize: number; - - /** ListTagsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListTagsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTagsRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListTagsRequest): google.cloud.datacatalog.v1.ListTagsRequest; - - /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListTagsRequest; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListTagsRequest; - - /** - * Verifies a ListTagsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTagsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListTagsRequest; - - /** - * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. - * @param message ListTagsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTagsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTagsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTagsResponse. */ - interface IListTagsResponse { - - /** ListTagsResponse tags */ - tags?: (google.cloud.datacatalog.v1.ITag[]|null); - - /** ListTagsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListTagsResponse. */ - class ListTagsResponse implements IListTagsResponse { - - /** - * Constructs a new ListTagsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListTagsResponse); - - /** ListTagsResponse tags. */ - public tags: google.cloud.datacatalog.v1.ITag[]; - - /** ListTagsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTagsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTagsResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListTagsResponse): google.cloud.datacatalog.v1.ListTagsResponse; - - /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListTagsResponse; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListTagsResponse; - - /** - * Verifies a ListTagsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTagsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListTagsResponse; - - /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. - * @param message ListTagsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTagsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTagsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntriesRequest. */ - interface IListEntriesRequest { - - /** ListEntriesRequest parent */ - parent?: (string|null); - - /** ListEntriesRequest pageSize */ - pageSize?: (number|null); - - /** ListEntriesRequest pageToken */ - pageToken?: (string|null); - - /** ListEntriesRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a ListEntriesRequest. */ - class ListEntriesRequest implements IListEntriesRequest { - - /** - * Constructs a new ListEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListEntriesRequest); - - /** ListEntriesRequest parent. */ - public parent: string; - - /** ListEntriesRequest pageSize. */ - public pageSize: number; - - /** ListEntriesRequest pageToken. */ - public pageToken: string; - - /** ListEntriesRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new ListEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntriesRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListEntriesRequest): google.cloud.datacatalog.v1.ListEntriesRequest; - - /** - * Encodes the specified ListEntriesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntriesRequest.verify|verify} messages. - * @param message ListEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntriesRequest.verify|verify} messages. - * @param message ListEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListEntriesRequest; - - /** - * Decodes a ListEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListEntriesRequest; - - /** - * Verifies a ListEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListEntriesRequest; - - /** - * Creates a plain object from a ListEntriesRequest message. Also converts values to other types if specified. - * @param message ListEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntriesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntriesResponse. */ - interface IListEntriesResponse { - - /** ListEntriesResponse entries */ - entries?: (google.cloud.datacatalog.v1.IEntry[]|null); - - /** ListEntriesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEntriesResponse. */ - class ListEntriesResponse implements IListEntriesResponse { - - /** - * Constructs a new ListEntriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListEntriesResponse); - - /** ListEntriesResponse entries. */ - public entries: google.cloud.datacatalog.v1.IEntry[]; - - /** ListEntriesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEntriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntriesResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListEntriesResponse): google.cloud.datacatalog.v1.ListEntriesResponse; - - /** - * Encodes the specified ListEntriesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntriesResponse.verify|verify} messages. - * @param message ListEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntriesResponse.verify|verify} messages. - * @param message ListEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListEntriesResponse; - - /** - * Decodes a ListEntriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListEntriesResponse; - - /** - * Verifies a ListEntriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListEntriesResponse; - - /** - * Creates a plain object from a ListEntriesResponse message. Also converts values to other types if specified. - * @param message ListEntriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntriesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StarEntryRequest. */ - interface IStarEntryRequest { - - /** StarEntryRequest name */ - name?: (string|null); - } - - /** Represents a StarEntryRequest. */ - class StarEntryRequest implements IStarEntryRequest { - - /** - * Constructs a new StarEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IStarEntryRequest); - - /** StarEntryRequest name. */ - public name: string; - - /** - * Creates a new StarEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StarEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IStarEntryRequest): google.cloud.datacatalog.v1.StarEntryRequest; - - /** - * Encodes the specified StarEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.StarEntryRequest.verify|verify} messages. - * @param message StarEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IStarEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StarEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.StarEntryRequest.verify|verify} messages. - * @param message StarEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IStarEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StarEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StarEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.StarEntryRequest; - - /** - * Decodes a StarEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StarEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.StarEntryRequest; - - /** - * Verifies a StarEntryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StarEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StarEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.StarEntryRequest; - - /** - * Creates a plain object from a StarEntryRequest message. Also converts values to other types if specified. - * @param message StarEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.StarEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StarEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StarEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StarEntryResponse. */ - interface IStarEntryResponse { - } - - /** Represents a StarEntryResponse. */ - class StarEntryResponse implements IStarEntryResponse { - - /** - * Constructs a new StarEntryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IStarEntryResponse); - - /** - * Creates a new StarEntryResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StarEntryResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IStarEntryResponse): google.cloud.datacatalog.v1.StarEntryResponse; - - /** - * Encodes the specified StarEntryResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.StarEntryResponse.verify|verify} messages. - * @param message StarEntryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IStarEntryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StarEntryResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.StarEntryResponse.verify|verify} messages. - * @param message StarEntryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IStarEntryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StarEntryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StarEntryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.StarEntryResponse; - - /** - * Decodes a StarEntryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StarEntryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.StarEntryResponse; - - /** - * Verifies a StarEntryResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StarEntryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StarEntryResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.StarEntryResponse; - - /** - * Creates a plain object from a StarEntryResponse message. Also converts values to other types if specified. - * @param message StarEntryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.StarEntryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StarEntryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StarEntryResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnstarEntryRequest. */ - interface IUnstarEntryRequest { - - /** UnstarEntryRequest name */ - name?: (string|null); - } - - /** Represents an UnstarEntryRequest. */ - class UnstarEntryRequest implements IUnstarEntryRequest { - - /** - * Constructs a new UnstarEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUnstarEntryRequest); - - /** UnstarEntryRequest name. */ - public name: string; - - /** - * Creates a new UnstarEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UnstarEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUnstarEntryRequest): google.cloud.datacatalog.v1.UnstarEntryRequest; - - /** - * Encodes the specified UnstarEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UnstarEntryRequest.verify|verify} messages. - * @param message UnstarEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUnstarEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnstarEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UnstarEntryRequest.verify|verify} messages. - * @param message UnstarEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUnstarEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnstarEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnstarEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UnstarEntryRequest; - - /** - * Decodes an UnstarEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnstarEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UnstarEntryRequest; - - /** - * Verifies an UnstarEntryRequest message. - * @param message Plain 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 UnstarEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnstarEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UnstarEntryRequest; - - /** - * Creates a plain object from an UnstarEntryRequest message. Also converts values to other types if specified. - * @param message UnstarEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UnstarEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnstarEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnstarEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UnstarEntryResponse. */ - interface IUnstarEntryResponse { - } - - /** Represents an UnstarEntryResponse. */ - class UnstarEntryResponse implements IUnstarEntryResponse { - - /** - * Constructs a new UnstarEntryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUnstarEntryResponse); - - /** - * Creates a new UnstarEntryResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns UnstarEntryResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUnstarEntryResponse): google.cloud.datacatalog.v1.UnstarEntryResponse; - - /** - * Encodes the specified UnstarEntryResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.UnstarEntryResponse.verify|verify} messages. - * @param message UnstarEntryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUnstarEntryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnstarEntryResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UnstarEntryResponse.verify|verify} messages. - * @param message UnstarEntryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUnstarEntryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnstarEntryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnstarEntryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UnstarEntryResponse; - - /** - * Decodes an UnstarEntryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnstarEntryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UnstarEntryResponse; - - /** - * Verifies an UnstarEntryResponse message. - * @param message Plain 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 UnstarEntryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnstarEntryResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UnstarEntryResponse; - - /** - * Creates a plain object from an UnstarEntryResponse message. Also converts values to other types if specified. - * @param message UnstarEntryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UnstarEntryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnstarEntryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnstarEntryResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ModifyEntryOverviewRequest. */ - interface IModifyEntryOverviewRequest { - - /** ModifyEntryOverviewRequest name */ - name?: (string|null); - - /** ModifyEntryOverviewRequest entryOverview */ - entryOverview?: (google.cloud.datacatalog.v1.IEntryOverview|null); - } - - /** Represents a ModifyEntryOverviewRequest. */ - class ModifyEntryOverviewRequest implements IModifyEntryOverviewRequest { - - /** - * Constructs a new ModifyEntryOverviewRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IModifyEntryOverviewRequest); - - /** ModifyEntryOverviewRequest name. */ - public name: string; - - /** ModifyEntryOverviewRequest entryOverview. */ - public entryOverview?: (google.cloud.datacatalog.v1.IEntryOverview|null); - - /** - * Creates a new ModifyEntryOverviewRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ModifyEntryOverviewRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IModifyEntryOverviewRequest): google.cloud.datacatalog.v1.ModifyEntryOverviewRequest; - - /** - * Encodes the specified ModifyEntryOverviewRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ModifyEntryOverviewRequest.verify|verify} messages. - * @param message ModifyEntryOverviewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IModifyEntryOverviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModifyEntryOverviewRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ModifyEntryOverviewRequest.verify|verify} messages. - * @param message ModifyEntryOverviewRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IModifyEntryOverviewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModifyEntryOverviewRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModifyEntryOverviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ModifyEntryOverviewRequest; - - /** - * Decodes a ModifyEntryOverviewRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModifyEntryOverviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ModifyEntryOverviewRequest; - - /** - * Verifies a ModifyEntryOverviewRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModifyEntryOverviewRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModifyEntryOverviewRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ModifyEntryOverviewRequest; - - /** - * Creates a plain object from a ModifyEntryOverviewRequest message. Also converts values to other types if specified. - * @param message ModifyEntryOverviewRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ModifyEntryOverviewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModifyEntryOverviewRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ModifyEntryOverviewRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ModifyEntryContactsRequest. */ - interface IModifyEntryContactsRequest { - - /** ModifyEntryContactsRequest name */ - name?: (string|null); - - /** ModifyEntryContactsRequest contacts */ - contacts?: (google.cloud.datacatalog.v1.IContacts|null); - } - - /** Represents a ModifyEntryContactsRequest. */ - class ModifyEntryContactsRequest implements IModifyEntryContactsRequest { - - /** - * Constructs a new ModifyEntryContactsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IModifyEntryContactsRequest); - - /** ModifyEntryContactsRequest name. */ - public name: string; - - /** ModifyEntryContactsRequest contacts. */ - public contacts?: (google.cloud.datacatalog.v1.IContacts|null); - - /** - * Creates a new ModifyEntryContactsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ModifyEntryContactsRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IModifyEntryContactsRequest): google.cloud.datacatalog.v1.ModifyEntryContactsRequest; - - /** - * Encodes the specified ModifyEntryContactsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ModifyEntryContactsRequest.verify|verify} messages. - * @param message ModifyEntryContactsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IModifyEntryContactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModifyEntryContactsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ModifyEntryContactsRequest.verify|verify} messages. - * @param message ModifyEntryContactsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IModifyEntryContactsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModifyEntryContactsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModifyEntryContactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ModifyEntryContactsRequest; - - /** - * Decodes a ModifyEntryContactsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModifyEntryContactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ModifyEntryContactsRequest; - - /** - * Verifies a ModifyEntryContactsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModifyEntryContactsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModifyEntryContactsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ModifyEntryContactsRequest; - - /** - * Creates a plain object from a ModifyEntryContactsRequest message. Also converts values to other types if specified. - * @param message ModifyEntryContactsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ModifyEntryContactsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModifyEntryContactsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ModifyEntryContactsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** EntryType enum. */ - enum EntryType { - ENTRY_TYPE_UNSPECIFIED = 0, - TABLE = 2, - MODEL = 5, - DATA_STREAM = 3, - FILESET = 4, - CLUSTER = 6, - DATABASE = 7, - DATA_SOURCE_CONNECTION = 8, - ROUTINE = 9, - LAKE = 10, - ZONE = 11, - SERVICE = 14 - } - - /** Properties of a DataplexSpec. */ - interface IDataplexSpec { - - /** DataplexSpec asset */ - asset?: (string|null); - - /** DataplexSpec dataFormat */ - dataFormat?: (google.cloud.datacatalog.v1.IPhysicalSchema|null); - - /** DataplexSpec compressionFormat */ - compressionFormat?: (string|null); - - /** DataplexSpec projectId */ - projectId?: (string|null); - } - - /** Represents a DataplexSpec. */ - class DataplexSpec implements IDataplexSpec { - - /** - * Constructs a new DataplexSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDataplexSpec); - - /** DataplexSpec asset. */ - public asset: string; - - /** DataplexSpec dataFormat. */ - public dataFormat?: (google.cloud.datacatalog.v1.IPhysicalSchema|null); - - /** DataplexSpec compressionFormat. */ - public compressionFormat: string; - - /** DataplexSpec projectId. */ - public projectId: string; - - /** - * Creates a new DataplexSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DataplexSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDataplexSpec): google.cloud.datacatalog.v1.DataplexSpec; - - /** - * Encodes the specified DataplexSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexSpec.verify|verify} messages. - * @param message DataplexSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDataplexSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataplexSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexSpec.verify|verify} messages. - * @param message DataplexSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDataplexSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataplexSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataplexSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DataplexSpec; - - /** - * Decodes a DataplexSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataplexSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DataplexSpec; - - /** - * Verifies a DataplexSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataplexSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataplexSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DataplexSpec; - - /** - * Creates a plain object from a DataplexSpec message. Also converts values to other types if specified. - * @param message DataplexSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DataplexSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataplexSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataplexSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataplexFilesetSpec. */ - interface IDataplexFilesetSpec { - - /** DataplexFilesetSpec dataplexSpec */ - dataplexSpec?: (google.cloud.datacatalog.v1.IDataplexSpec|null); - } - - /** Represents a DataplexFilesetSpec. */ - class DataplexFilesetSpec implements IDataplexFilesetSpec { - - /** - * Constructs a new DataplexFilesetSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDataplexFilesetSpec); - - /** DataplexFilesetSpec dataplexSpec. */ - public dataplexSpec?: (google.cloud.datacatalog.v1.IDataplexSpec|null); - - /** - * Creates a new DataplexFilesetSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DataplexFilesetSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDataplexFilesetSpec): google.cloud.datacatalog.v1.DataplexFilesetSpec; - - /** - * Encodes the specified DataplexFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexFilesetSpec.verify|verify} messages. - * @param message DataplexFilesetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDataplexFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataplexFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexFilesetSpec.verify|verify} messages. - * @param message DataplexFilesetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDataplexFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataplexFilesetSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataplexFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DataplexFilesetSpec; - - /** - * Decodes a DataplexFilesetSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataplexFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DataplexFilesetSpec; - - /** - * Verifies a DataplexFilesetSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataplexFilesetSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataplexFilesetSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DataplexFilesetSpec; - - /** - * Creates a plain object from a DataplexFilesetSpec message. Also converts values to other types if specified. - * @param message DataplexFilesetSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DataplexFilesetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataplexFilesetSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataplexFilesetSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataplexTableSpec. */ - interface IDataplexTableSpec { - - /** DataplexTableSpec externalTables */ - externalTables?: (google.cloud.datacatalog.v1.IDataplexExternalTable[]|null); - - /** DataplexTableSpec dataplexSpec */ - dataplexSpec?: (google.cloud.datacatalog.v1.IDataplexSpec|null); - - /** DataplexTableSpec userManaged */ - userManaged?: (boolean|null); - } - - /** Represents a DataplexTableSpec. */ - class DataplexTableSpec implements IDataplexTableSpec { - - /** - * Constructs a new DataplexTableSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDataplexTableSpec); - - /** DataplexTableSpec externalTables. */ - public externalTables: google.cloud.datacatalog.v1.IDataplexExternalTable[]; - - /** DataplexTableSpec dataplexSpec. */ - public dataplexSpec?: (google.cloud.datacatalog.v1.IDataplexSpec|null); - - /** DataplexTableSpec userManaged. */ - public userManaged: boolean; - - /** - * Creates a new DataplexTableSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns DataplexTableSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDataplexTableSpec): google.cloud.datacatalog.v1.DataplexTableSpec; - - /** - * Encodes the specified DataplexTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexTableSpec.verify|verify} messages. - * @param message DataplexTableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDataplexTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataplexTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexTableSpec.verify|verify} messages. - * @param message DataplexTableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDataplexTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataplexTableSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataplexTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DataplexTableSpec; - - /** - * Decodes a DataplexTableSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataplexTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DataplexTableSpec; - - /** - * Verifies a DataplexTableSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataplexTableSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataplexTableSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DataplexTableSpec; - - /** - * Creates a plain object from a DataplexTableSpec message. Also converts values to other types if specified. - * @param message DataplexTableSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DataplexTableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataplexTableSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataplexTableSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataplexExternalTable. */ - interface IDataplexExternalTable { - - /** DataplexExternalTable system */ - system?: (google.cloud.datacatalog.v1.IntegratedSystem|keyof typeof google.cloud.datacatalog.v1.IntegratedSystem|null); - - /** DataplexExternalTable fullyQualifiedName */ - fullyQualifiedName?: (string|null); - - /** DataplexExternalTable googleCloudResource */ - googleCloudResource?: (string|null); - - /** DataplexExternalTable dataCatalogEntry */ - dataCatalogEntry?: (string|null); - } - - /** Represents a DataplexExternalTable. */ - class DataplexExternalTable implements IDataplexExternalTable { - - /** - * Constructs a new DataplexExternalTable. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDataplexExternalTable); - - /** DataplexExternalTable system. */ - public system: (google.cloud.datacatalog.v1.IntegratedSystem|keyof typeof google.cloud.datacatalog.v1.IntegratedSystem); - - /** DataplexExternalTable fullyQualifiedName. */ - public fullyQualifiedName: string; - - /** DataplexExternalTable googleCloudResource. */ - public googleCloudResource: string; - - /** DataplexExternalTable dataCatalogEntry. */ - public dataCatalogEntry: string; - - /** - * Creates a new DataplexExternalTable instance using the specified properties. - * @param [properties] Properties to set - * @returns DataplexExternalTable instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDataplexExternalTable): google.cloud.datacatalog.v1.DataplexExternalTable; - - /** - * Encodes the specified DataplexExternalTable message. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexExternalTable.verify|verify} messages. - * @param message DataplexExternalTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDataplexExternalTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataplexExternalTable message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexExternalTable.verify|verify} messages. - * @param message DataplexExternalTable message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDataplexExternalTable, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataplexExternalTable message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataplexExternalTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DataplexExternalTable; - - /** - * Decodes a DataplexExternalTable message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataplexExternalTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DataplexExternalTable; - - /** - * Verifies a DataplexExternalTable message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataplexExternalTable message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataplexExternalTable - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DataplexExternalTable; - - /** - * Creates a plain object from a DataplexExternalTable message. Also converts values to other types if specified. - * @param message DataplexExternalTable - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DataplexExternalTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataplexExternalTable to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataplexExternalTable - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhysicalSchema. */ - interface IPhysicalSchema { - - /** PhysicalSchema avro */ - avro?: (google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema|null); - - /** PhysicalSchema thrift */ - thrift?: (google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema|null); - - /** PhysicalSchema protobuf */ - protobuf?: (google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema|null); - - /** PhysicalSchema parquet */ - parquet?: (google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema|null); - - /** PhysicalSchema orc */ - orc?: (google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema|null); - - /** PhysicalSchema csv */ - csv?: (google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema|null); - } - - /** Represents a PhysicalSchema. */ - class PhysicalSchema implements IPhysicalSchema { - - /** - * Constructs a new PhysicalSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IPhysicalSchema); - - /** PhysicalSchema avro. */ - public avro?: (google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema|null); - - /** PhysicalSchema thrift. */ - public thrift?: (google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema|null); - - /** PhysicalSchema protobuf. */ - public protobuf?: (google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema|null); - - /** PhysicalSchema parquet. */ - public parquet?: (google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema|null); - - /** PhysicalSchema orc. */ - public orc?: (google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema|null); - - /** PhysicalSchema csv. */ - public csv?: (google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema|null); - - /** PhysicalSchema schema. */ - public schema?: ("avro"|"thrift"|"protobuf"|"parquet"|"orc"|"csv"); - - /** - * Creates a new PhysicalSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns PhysicalSchema instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IPhysicalSchema): google.cloud.datacatalog.v1.PhysicalSchema; - - /** - * Encodes the specified PhysicalSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.verify|verify} messages. - * @param message PhysicalSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IPhysicalSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhysicalSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.verify|verify} messages. - * @param message PhysicalSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IPhysicalSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhysicalSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhysicalSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.PhysicalSchema; - - /** - * Decodes a PhysicalSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhysicalSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.PhysicalSchema; - - /** - * Verifies a PhysicalSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhysicalSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhysicalSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.PhysicalSchema; - - /** - * Creates a plain object from a PhysicalSchema message. Also converts values to other types if specified. - * @param message PhysicalSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.PhysicalSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhysicalSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhysicalSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PhysicalSchema { - - /** Properties of an AvroSchema. */ - interface IAvroSchema { - - /** AvroSchema text */ - text?: (string|null); - } - - /** Represents an AvroSchema. */ - class AvroSchema implements IAvroSchema { - - /** - * Constructs a new AvroSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema); - - /** AvroSchema text. */ - public text: string; - - /** - * Creates a new AvroSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns AvroSchema instance - */ - public static create(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema): google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema; - - /** - * Encodes the specified AvroSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema.verify|verify} messages. - * @param message AvroSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AvroSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema.verify|verify} messages. - * @param message AvroSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AvroSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AvroSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema; - - /** - * Decodes an AvroSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AvroSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema; - - /** - * Verifies an AvroSchema message. - * @param message Plain 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 AvroSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AvroSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema; - - /** - * Creates a plain object from an AvroSchema message. Also converts values to other types if specified. - * @param message AvroSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AvroSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AvroSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ThriftSchema. */ - interface IThriftSchema { - - /** ThriftSchema text */ - text?: (string|null); - } - - /** Represents a ThriftSchema. */ - class ThriftSchema implements IThriftSchema { - - /** - * Constructs a new ThriftSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema); - - /** ThriftSchema text. */ - public text: string; - - /** - * Creates a new ThriftSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns ThriftSchema instance - */ - public static create(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema): google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema; - - /** - * Encodes the specified ThriftSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.verify|verify} messages. - * @param message ThriftSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ThriftSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.verify|verify} messages. - * @param message ThriftSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ThriftSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ThriftSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema; - - /** - * Decodes a ThriftSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ThriftSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema; - - /** - * Verifies a ThriftSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ThriftSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ThriftSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema; - - /** - * Creates a plain object from a ThriftSchema message. Also converts values to other types if specified. - * @param message ThriftSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ThriftSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ThriftSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ProtobufSchema. */ - interface IProtobufSchema { - - /** ProtobufSchema text */ - text?: (string|null); - } - - /** Represents a ProtobufSchema. */ - class ProtobufSchema implements IProtobufSchema { - - /** - * Constructs a new ProtobufSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema); - - /** ProtobufSchema text. */ - public text: string; - - /** - * Creates a new ProtobufSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns ProtobufSchema instance - */ - public static create(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema): google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema; - - /** - * Encodes the specified ProtobufSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema.verify|verify} messages. - * @param message ProtobufSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProtobufSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema.verify|verify} messages. - * @param message ProtobufSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProtobufSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProtobufSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema; - - /** - * Decodes a ProtobufSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProtobufSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema; - - /** - * Verifies a ProtobufSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProtobufSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProtobufSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema; - - /** - * Creates a plain object from a ProtobufSchema message. Also converts values to other types if specified. - * @param message ProtobufSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProtobufSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProtobufSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ParquetSchema. */ - interface IParquetSchema { - } - - /** Represents a ParquetSchema. */ - class ParquetSchema implements IParquetSchema { - - /** - * Constructs a new ParquetSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema); - - /** - * Creates a new ParquetSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns ParquetSchema instance - */ - public static create(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema): google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema; - - /** - * Encodes the specified ParquetSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema.verify|verify} messages. - * @param message ParquetSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ParquetSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema.verify|verify} messages. - * @param message ParquetSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ParquetSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParquetSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema; - - /** - * Decodes a ParquetSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParquetSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema; - - /** - * Verifies a ParquetSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ParquetSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParquetSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema; - - /** - * Creates a plain object from a ParquetSchema message. Also converts values to other types if specified. - * @param message ParquetSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ParquetSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ParquetSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OrcSchema. */ - interface IOrcSchema { - } - - /** Represents an OrcSchema. */ - class OrcSchema implements IOrcSchema { - - /** - * Constructs a new OrcSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema); - - /** - * Creates a new OrcSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns OrcSchema instance - */ - public static create(properties?: google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema): google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema; - - /** - * Encodes the specified OrcSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema.verify|verify} messages. - * @param message OrcSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OrcSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema.verify|verify} messages. - * @param message OrcSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OrcSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OrcSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema; - - /** - * Decodes an OrcSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OrcSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema; - - /** - * Verifies an OrcSchema message. - * @param message Plain 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 OrcSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OrcSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema; - - /** - * Creates a plain object from an OrcSchema message. Also converts values to other types if specified. - * @param message OrcSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OrcSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OrcSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CsvSchema. */ - interface ICsvSchema { - } - - /** Represents a CsvSchema. */ - class CsvSchema implements ICsvSchema { - - /** - * Constructs a new CsvSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema); - - /** - * Creates a new CsvSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns CsvSchema instance - */ - public static create(properties?: google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema): google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema; - - /** - * Encodes the specified CsvSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.verify|verify} messages. - * @param message CsvSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CsvSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.verify|verify} messages. - * @param message CsvSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CsvSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CsvSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema; - - /** - * Decodes a CsvSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CsvSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema; - - /** - * Verifies a CsvSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CsvSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CsvSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema; - - /** - * Creates a plain object from a CsvSchema message. Also converts values to other types if specified. - * @param message CsvSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CsvSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CsvSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GcsFilesetSpec. */ - interface IGcsFilesetSpec { - - /** GcsFilesetSpec filePatterns */ - filePatterns?: (string[]|null); - - /** GcsFilesetSpec sampleGcsFileSpecs */ - sampleGcsFileSpecs?: (google.cloud.datacatalog.v1.IGcsFileSpec[]|null); - } - - /** Represents a GcsFilesetSpec. */ - class GcsFilesetSpec implements IGcsFilesetSpec { - - /** - * Constructs a new GcsFilesetSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IGcsFilesetSpec); - - /** GcsFilesetSpec filePatterns. */ - public filePatterns: string[]; - - /** GcsFilesetSpec sampleGcsFileSpecs. */ - public sampleGcsFileSpecs: google.cloud.datacatalog.v1.IGcsFileSpec[]; - - /** - * Creates a new GcsFilesetSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsFilesetSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IGcsFilesetSpec): google.cloud.datacatalog.v1.GcsFilesetSpec; - - /** - * Encodes the specified GcsFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.GcsFilesetSpec.verify|verify} messages. - * @param message GcsFilesetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IGcsFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GcsFilesetSpec.verify|verify} messages. - * @param message GcsFilesetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IGcsFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.GcsFilesetSpec; - - /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.GcsFilesetSpec; - - /** - * Verifies a GcsFilesetSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsFilesetSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsFilesetSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.GcsFilesetSpec; - - /** - * Creates a plain object from a GcsFilesetSpec message. Also converts values to other types if specified. - * @param message GcsFilesetSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.GcsFilesetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsFilesetSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsFilesetSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcsFileSpec. */ - interface IGcsFileSpec { - - /** GcsFileSpec filePath */ - filePath?: (string|null); - - /** GcsFileSpec gcsTimestamps */ - gcsTimestamps?: (google.cloud.datacatalog.v1.ISystemTimestamps|null); - - /** GcsFileSpec sizeBytes */ - sizeBytes?: (number|Long|string|null); - } - - /** Represents a GcsFileSpec. */ - class GcsFileSpec implements IGcsFileSpec { - - /** - * Constructs a new GcsFileSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IGcsFileSpec); - - /** GcsFileSpec filePath. */ - public filePath: string; - - /** GcsFileSpec gcsTimestamps. */ - public gcsTimestamps?: (google.cloud.datacatalog.v1.ISystemTimestamps|null); - - /** GcsFileSpec sizeBytes. */ - public sizeBytes: (number|Long|string); - - /** - * Creates a new GcsFileSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsFileSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IGcsFileSpec): google.cloud.datacatalog.v1.GcsFileSpec; - - /** - * Encodes the specified GcsFileSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.GcsFileSpec.verify|verify} messages. - * @param message GcsFileSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IGcsFileSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsFileSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GcsFileSpec.verify|verify} messages. - * @param message GcsFileSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IGcsFileSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsFileSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsFileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.GcsFileSpec; - - /** - * Decodes a GcsFileSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsFileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.GcsFileSpec; - - /** - * Verifies a GcsFileSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsFileSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsFileSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.GcsFileSpec; - - /** - * Creates a plain object from a GcsFileSpec message. Also converts values to other types if specified. - * @param message GcsFileSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.GcsFileSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsFileSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsFileSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SystemTimestamps. */ - interface ISystemTimestamps { - - /** SystemTimestamps createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** SystemTimestamps updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** SystemTimestamps expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a SystemTimestamps. */ - class SystemTimestamps implements ISystemTimestamps { - - /** - * Constructs a new SystemTimestamps. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ISystemTimestamps); - - /** SystemTimestamps createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** SystemTimestamps updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** SystemTimestamps expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new SystemTimestamps instance using the specified properties. - * @param [properties] Properties to set - * @returns SystemTimestamps instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ISystemTimestamps): google.cloud.datacatalog.v1.SystemTimestamps; - - /** - * Encodes the specified SystemTimestamps message. Does not implicitly {@link google.cloud.datacatalog.v1.SystemTimestamps.verify|verify} messages. - * @param message SystemTimestamps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ISystemTimestamps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SystemTimestamps message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SystemTimestamps.verify|verify} messages. - * @param message SystemTimestamps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ISystemTimestamps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SystemTimestamps message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SystemTimestamps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.SystemTimestamps; - - /** - * Decodes a SystemTimestamps message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SystemTimestamps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.SystemTimestamps; - - /** - * Verifies a SystemTimestamps message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SystemTimestamps message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SystemTimestamps - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SystemTimestamps; - - /** - * Creates a plain object from a SystemTimestamps message. Also converts values to other types if specified. - * @param message SystemTimestamps - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.SystemTimestamps, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SystemTimestamps to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SystemTimestamps - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Schema. */ - interface ISchema { - - /** Schema columns */ - columns?: (google.cloud.datacatalog.v1.IColumnSchema[]|null); - } - - /** Represents a Schema. */ - class Schema implements ISchema { - - /** - * Constructs a new Schema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ISchema); - - /** Schema columns. */ - public columns: google.cloud.datacatalog.v1.IColumnSchema[]; - - /** - * Creates a new Schema instance using the specified properties. - * @param [properties] Properties to set - * @returns Schema instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ISchema): google.cloud.datacatalog.v1.Schema; - - /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.datacatalog.v1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Schema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.Schema; - - /** - * Decodes a Schema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.Schema; - - /** - * Verifies a Schema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Schema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.Schema; - - /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @param message Schema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Schema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Schema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ColumnSchema. */ - interface IColumnSchema { - - /** ColumnSchema column */ - column?: (string|null); - - /** ColumnSchema type */ - type?: (string|null); - - /** ColumnSchema description */ - description?: (string|null); - - /** ColumnSchema mode */ - mode?: (string|null); - - /** ColumnSchema subcolumns */ - subcolumns?: (google.cloud.datacatalog.v1.IColumnSchema[]|null); - } - - /** Represents a ColumnSchema. */ - class ColumnSchema implements IColumnSchema { - - /** - * Constructs a new ColumnSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IColumnSchema); - - /** ColumnSchema column. */ - public column: string; - - /** ColumnSchema type. */ - public type: string; - - /** ColumnSchema description. */ - public description: string; - - /** ColumnSchema mode. */ - public mode: string; - - /** ColumnSchema subcolumns. */ - public subcolumns: google.cloud.datacatalog.v1.IColumnSchema[]; - - /** - * Creates a new ColumnSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns ColumnSchema instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IColumnSchema): google.cloud.datacatalog.v1.ColumnSchema; - - /** - * Encodes the specified ColumnSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.verify|verify} messages. - * @param message ColumnSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IColumnSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ColumnSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.verify|verify} messages. - * @param message ColumnSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IColumnSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ColumnSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ColumnSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ColumnSchema; - - /** - * Decodes a ColumnSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ColumnSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ColumnSchema; - - /** - * Verifies a ColumnSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ColumnSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ColumnSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ColumnSchema; - - /** - * Creates a plain object from a ColumnSchema message. Also converts values to other types if specified. - * @param message ColumnSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ColumnSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ColumnSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ColumnSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SearchCatalogResult. */ - interface ISearchCatalogResult { - - /** SearchCatalogResult searchResultType */ - searchResultType?: (google.cloud.datacatalog.v1.SearchResultType|keyof typeof google.cloud.datacatalog.v1.SearchResultType|null); - - /** SearchCatalogResult searchResultSubtype */ - searchResultSubtype?: (string|null); - - /** SearchCatalogResult relativeResourceName */ - relativeResourceName?: (string|null); - - /** SearchCatalogResult linkedResource */ - linkedResource?: (string|null); - - /** SearchCatalogResult modifyTime */ - modifyTime?: (google.protobuf.ITimestamp|null); - - /** SearchCatalogResult integratedSystem */ - integratedSystem?: (google.cloud.datacatalog.v1.IntegratedSystem|keyof typeof google.cloud.datacatalog.v1.IntegratedSystem|null); - - /** SearchCatalogResult userSpecifiedSystem */ - userSpecifiedSystem?: (string|null); - - /** SearchCatalogResult fullyQualifiedName */ - fullyQualifiedName?: (string|null); - - /** SearchCatalogResult displayName */ - displayName?: (string|null); - - /** SearchCatalogResult description */ - description?: (string|null); - } - - /** Represents a SearchCatalogResult. */ - class SearchCatalogResult implements ISearchCatalogResult { - - /** - * Constructs a new SearchCatalogResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ISearchCatalogResult); - - /** SearchCatalogResult searchResultType. */ - public searchResultType: (google.cloud.datacatalog.v1.SearchResultType|keyof typeof google.cloud.datacatalog.v1.SearchResultType); - - /** SearchCatalogResult searchResultSubtype. */ - public searchResultSubtype: string; - - /** SearchCatalogResult relativeResourceName. */ - public relativeResourceName: string; - - /** SearchCatalogResult linkedResource. */ - public linkedResource: string; - - /** SearchCatalogResult modifyTime. */ - public modifyTime?: (google.protobuf.ITimestamp|null); - - /** SearchCatalogResult integratedSystem. */ - public integratedSystem?: (google.cloud.datacatalog.v1.IntegratedSystem|keyof typeof google.cloud.datacatalog.v1.IntegratedSystem|null); - - /** SearchCatalogResult userSpecifiedSystem. */ - public userSpecifiedSystem?: (string|null); - - /** SearchCatalogResult fullyQualifiedName. */ - public fullyQualifiedName: string; - - /** SearchCatalogResult displayName. */ - public displayName: string; - - /** SearchCatalogResult description. */ - public description: string; - - /** SearchCatalogResult system. */ - public system?: ("integratedSystem"|"userSpecifiedSystem"); - - /** - * Creates a new SearchCatalogResult instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchCatalogResult instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ISearchCatalogResult): google.cloud.datacatalog.v1.SearchCatalogResult; - - /** - * Encodes the specified SearchCatalogResult message. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogResult.verify|verify} messages. - * @param message SearchCatalogResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ISearchCatalogResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchCatalogResult message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogResult.verify|verify} messages. - * @param message SearchCatalogResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ISearchCatalogResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchCatalogResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchCatalogResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.SearchCatalogResult; - - /** - * Decodes a SearchCatalogResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchCatalogResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.SearchCatalogResult; - - /** - * Verifies a SearchCatalogResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchCatalogResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchCatalogResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SearchCatalogResult; - - /** - * Creates a plain object from a SearchCatalogResult message. Also converts values to other types if specified. - * @param message SearchCatalogResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.SearchCatalogResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchCatalogResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchCatalogResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** SearchResultType enum. */ - enum SearchResultType { - SEARCH_RESULT_TYPE_UNSPECIFIED = 0, - ENTRY = 1, - TAG_TEMPLATE = 2, - ENTRY_GROUP = 3 - } - - /** Properties of a BigQueryTableSpec. */ - interface IBigQueryTableSpec { - - /** BigQueryTableSpec tableSourceType */ - tableSourceType?: (google.cloud.datacatalog.v1.TableSourceType|keyof typeof google.cloud.datacatalog.v1.TableSourceType|null); - - /** BigQueryTableSpec viewSpec */ - viewSpec?: (google.cloud.datacatalog.v1.IViewSpec|null); - - /** BigQueryTableSpec tableSpec */ - tableSpec?: (google.cloud.datacatalog.v1.ITableSpec|null); - } - - /** Represents a BigQueryTableSpec. */ - class BigQueryTableSpec implements IBigQueryTableSpec { - - /** - * Constructs a new BigQueryTableSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IBigQueryTableSpec); - - /** BigQueryTableSpec tableSourceType. */ - public tableSourceType: (google.cloud.datacatalog.v1.TableSourceType|keyof typeof google.cloud.datacatalog.v1.TableSourceType); - - /** BigQueryTableSpec viewSpec. */ - public viewSpec?: (google.cloud.datacatalog.v1.IViewSpec|null); - - /** BigQueryTableSpec tableSpec. */ - public tableSpec?: (google.cloud.datacatalog.v1.ITableSpec|null); - - /** BigQueryTableSpec typeSpec. */ - public typeSpec?: ("viewSpec"|"tableSpec"); - - /** - * Creates a new BigQueryTableSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryTableSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IBigQueryTableSpec): google.cloud.datacatalog.v1.BigQueryTableSpec; - - /** - * Encodes the specified BigQueryTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryTableSpec.verify|verify} messages. - * @param message BigQueryTableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IBigQueryTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryTableSpec.verify|verify} messages. - * @param message BigQueryTableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IBigQueryTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.BigQueryTableSpec; - - /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.BigQueryTableSpec; - - /** - * Verifies a BigQueryTableSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryTableSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryTableSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.BigQueryTableSpec; - - /** - * Creates a plain object from a BigQueryTableSpec message. Also converts values to other types if specified. - * @param message BigQueryTableSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.BigQueryTableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryTableSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryTableSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** TableSourceType enum. */ - enum TableSourceType { - TABLE_SOURCE_TYPE_UNSPECIFIED = 0, - BIGQUERY_VIEW = 2, - BIGQUERY_TABLE = 5, - BIGQUERY_MATERIALIZED_VIEW = 7 - } - - /** Properties of a ViewSpec. */ - interface IViewSpec { - - /** ViewSpec viewQuery */ - viewQuery?: (string|null); - } - - /** Represents a ViewSpec. */ - class ViewSpec implements IViewSpec { - - /** - * Constructs a new ViewSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IViewSpec); - - /** ViewSpec viewQuery. */ - public viewQuery: string; - - /** - * Creates a new ViewSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ViewSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IViewSpec): google.cloud.datacatalog.v1.ViewSpec; - - /** - * Encodes the specified ViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ViewSpec.verify|verify} messages. - * @param message ViewSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ViewSpec.verify|verify} messages. - * @param message ViewSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ViewSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ViewSpec; - - /** - * Decodes a ViewSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ViewSpec; - - /** - * Verifies a ViewSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ViewSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ViewSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ViewSpec; - - /** - * Creates a plain object from a ViewSpec message. Also converts values to other types if specified. - * @param message ViewSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ViewSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ViewSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ViewSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TableSpec. */ - interface ITableSpec { - - /** TableSpec groupedEntry */ - groupedEntry?: (string|null); - } - - /** Represents a TableSpec. */ - class TableSpec implements ITableSpec { - - /** - * Constructs a new TableSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ITableSpec); - - /** TableSpec groupedEntry. */ - public groupedEntry: string; - - /** - * Creates a new TableSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns TableSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ITableSpec): google.cloud.datacatalog.v1.TableSpec; - - /** - * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.TableSpec.verify|verify} messages. - * @param message TableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TableSpec.verify|verify} messages. - * @param message TableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TableSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.TableSpec; - - /** - * Decodes a TableSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.TableSpec; - - /** - * Verifies a TableSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TableSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TableSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.TableSpec; - - /** - * Creates a plain object from a TableSpec message. Also converts values to other types if specified. - * @param message TableSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.TableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TableSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TableSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BigQueryDateShardedSpec. */ - interface IBigQueryDateShardedSpec { - - /** BigQueryDateShardedSpec dataset */ - dataset?: (string|null); - - /** BigQueryDateShardedSpec tablePrefix */ - tablePrefix?: (string|null); - - /** BigQueryDateShardedSpec shardCount */ - shardCount?: (number|Long|string|null); - - /** BigQueryDateShardedSpec latestShardResource */ - latestShardResource?: (string|null); - } - - /** Represents a BigQueryDateShardedSpec. */ - class BigQueryDateShardedSpec implements IBigQueryDateShardedSpec { - - /** - * Constructs a new BigQueryDateShardedSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IBigQueryDateShardedSpec); - - /** BigQueryDateShardedSpec dataset. */ - public dataset: string; - - /** BigQueryDateShardedSpec tablePrefix. */ - public tablePrefix: string; - - /** BigQueryDateShardedSpec shardCount. */ - public shardCount: (number|Long|string); - - /** BigQueryDateShardedSpec latestShardResource. */ - public latestShardResource: string; - - /** - * Creates a new BigQueryDateShardedSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryDateShardedSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IBigQueryDateShardedSpec): google.cloud.datacatalog.v1.BigQueryDateShardedSpec; - - /** - * Encodes the specified BigQueryDateShardedSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryDateShardedSpec.verify|verify} messages. - * @param message BigQueryDateShardedSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IBigQueryDateShardedSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryDateShardedSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryDateShardedSpec.verify|verify} messages. - * @param message BigQueryDateShardedSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IBigQueryDateShardedSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryDateShardedSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.BigQueryDateShardedSpec; - - /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryDateShardedSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.BigQueryDateShardedSpec; - - /** - * Verifies a BigQueryDateShardedSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryDateShardedSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryDateShardedSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.BigQueryDateShardedSpec; - - /** - * Creates a plain object from a BigQueryDateShardedSpec message. Also converts values to other types if specified. - * @param message BigQueryDateShardedSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.BigQueryDateShardedSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryDateShardedSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryDateShardedSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Tag. */ - interface ITag { - - /** Tag name */ - name?: (string|null); - - /** Tag template */ - template?: (string|null); - - /** Tag templateDisplayName */ - templateDisplayName?: (string|null); - - /** Tag column */ - column?: (string|null); - - /** Tag fields */ - fields?: ({ [k: string]: google.cloud.datacatalog.v1.ITagField }|null); - } - - /** Represents a Tag. */ - class Tag implements ITag { - - /** - * Constructs a new Tag. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ITag); - - /** Tag name. */ - public name: string; - - /** Tag template. */ - public template: string; - - /** Tag templateDisplayName. */ - public templateDisplayName: string; - - /** Tag column. */ - public column?: (string|null); - - /** Tag fields. */ - public fields: { [k: string]: google.cloud.datacatalog.v1.ITagField }; - - /** Tag scope. */ - public scope?: "column"; - - /** - * Creates a new Tag instance using the specified properties. - * @param [properties] Properties to set - * @returns Tag instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ITag): google.cloud.datacatalog.v1.Tag; - - /** - * Encodes the specified Tag message. Does not implicitly {@link google.cloud.datacatalog.v1.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.Tag; - - /** - * Decodes a Tag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.Tag; - - /** - * Verifies a Tag message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tag - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.Tag; - - /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @param message Tag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Tag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TagField. */ - interface ITagField { - - /** TagField displayName */ - displayName?: (string|null); - - /** TagField doubleValue */ - doubleValue?: (number|null); - - /** TagField stringValue */ - stringValue?: (string|null); - - /** TagField boolValue */ - boolValue?: (boolean|null); - - /** TagField timestampValue */ - timestampValue?: (google.protobuf.ITimestamp|null); - - /** TagField enumValue */ - enumValue?: (google.cloud.datacatalog.v1.TagField.IEnumValue|null); - - /** TagField richtextValue */ - richtextValue?: (string|null); - - /** TagField order */ - order?: (number|null); - } - - /** Represents a TagField. */ - class TagField implements ITagField { - - /** - * Constructs a new TagField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ITagField); - - /** TagField displayName. */ - public displayName: string; - - /** TagField doubleValue. */ - public doubleValue?: (number|null); - - /** TagField stringValue. */ - public stringValue?: (string|null); - - /** TagField boolValue. */ - public boolValue?: (boolean|null); - - /** TagField timestampValue. */ - public timestampValue?: (google.protobuf.ITimestamp|null); - - /** TagField enumValue. */ - public enumValue?: (google.cloud.datacatalog.v1.TagField.IEnumValue|null); - - /** TagField richtextValue. */ - public richtextValue?: (string|null); - - /** TagField order. */ - public order: number; - - /** TagField kind. */ - public kind?: ("doubleValue"|"stringValue"|"boolValue"|"timestampValue"|"enumValue"|"richtextValue"); - - /** - * Creates a new TagField instance using the specified properties. - * @param [properties] Properties to set - * @returns TagField instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ITagField): google.cloud.datacatalog.v1.TagField; - - /** - * Encodes the specified TagField message. Does not implicitly {@link google.cloud.datacatalog.v1.TagField.verify|verify} messages. - * @param message TagField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ITagField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TagField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TagField.verify|verify} messages. - * @param message TagField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ITagField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TagField message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TagField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.TagField; - - /** - * Decodes a TagField message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TagField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.TagField; - - /** - * Verifies a TagField message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TagField message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TagField - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.TagField; - - /** - * Creates a plain object from a TagField message. Also converts values to other types if specified. - * @param message TagField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.TagField, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TagField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TagField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TagField { - - /** Properties of an EnumValue. */ - interface IEnumValue { - - /** EnumValue displayName */ - displayName?: (string|null); - } - - /** Represents an EnumValue. */ - class EnumValue implements IEnumValue { - - /** - * Constructs a new EnumValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.TagField.IEnumValue); - - /** EnumValue displayName. */ - public displayName: string; - - /** - * Creates a new EnumValue instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValue instance - */ - public static create(properties?: google.cloud.datacatalog.v1.TagField.IEnumValue): google.cloud.datacatalog.v1.TagField.EnumValue; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1.TagField.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.TagField.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TagField.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.TagField.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.TagField.EnumValue; - - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.TagField.EnumValue; - - /** - * Verifies an EnumValue message. - * @param message Plain 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 EnumValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.TagField.EnumValue; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @param message EnumValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.TagField.EnumValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a TagTemplate. */ - interface ITagTemplate { - - /** TagTemplate name */ - name?: (string|null); - - /** TagTemplate displayName */ - displayName?: (string|null); - - /** TagTemplate isPubliclyReadable */ - isPubliclyReadable?: (boolean|null); - - /** TagTemplate fields */ - fields?: ({ [k: string]: google.cloud.datacatalog.v1.ITagTemplateField }|null); - } - - /** Represents a TagTemplate. */ - class TagTemplate implements ITagTemplate { - - /** - * Constructs a new TagTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ITagTemplate); - - /** TagTemplate name. */ - public name: string; - - /** TagTemplate displayName. */ - public displayName: string; - - /** TagTemplate isPubliclyReadable. */ - public isPubliclyReadable: boolean; - - /** TagTemplate fields. */ - public fields: { [k: string]: google.cloud.datacatalog.v1.ITagTemplateField }; - - /** - * Creates a new TagTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns TagTemplate instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ITagTemplate): google.cloud.datacatalog.v1.TagTemplate; - - /** - * Encodes the specified TagTemplate message. Does not implicitly {@link google.cloud.datacatalog.v1.TagTemplate.verify|verify} messages. - * @param message TagTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ITagTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TagTemplate message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TagTemplate.verify|verify} messages. - * @param message TagTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ITagTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TagTemplate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TagTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.TagTemplate; - - /** - * Decodes a TagTemplate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TagTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.TagTemplate; - - /** - * Verifies a TagTemplate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TagTemplate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TagTemplate - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.TagTemplate; - - /** - * Creates a plain object from a TagTemplate message. Also converts values to other types if specified. - * @param message TagTemplate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.TagTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TagTemplate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TagTemplate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TagTemplateField. */ - interface ITagTemplateField { - - /** TagTemplateField name */ - name?: (string|null); - - /** TagTemplateField displayName */ - displayName?: (string|null); - - /** TagTemplateField type */ - type?: (google.cloud.datacatalog.v1.IFieldType|null); - - /** TagTemplateField isRequired */ - isRequired?: (boolean|null); - - /** TagTemplateField description */ - description?: (string|null); - - /** TagTemplateField order */ - order?: (number|null); - } - - /** Represents a TagTemplateField. */ - class TagTemplateField implements ITagTemplateField { - - /** - * Constructs a new TagTemplateField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ITagTemplateField); - - /** TagTemplateField name. */ - public name: string; - - /** TagTemplateField displayName. */ - public displayName: string; - - /** TagTemplateField type. */ - public type?: (google.cloud.datacatalog.v1.IFieldType|null); - - /** TagTemplateField isRequired. */ - public isRequired: boolean; - - /** TagTemplateField description. */ - public description: string; - - /** TagTemplateField order. */ - public order: number; - - /** - * Creates a new TagTemplateField instance using the specified properties. - * @param [properties] Properties to set - * @returns TagTemplateField instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ITagTemplateField): google.cloud.datacatalog.v1.TagTemplateField; - - /** - * Encodes the specified TagTemplateField message. Does not implicitly {@link google.cloud.datacatalog.v1.TagTemplateField.verify|verify} messages. - * @param message TagTemplateField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ITagTemplateField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TagTemplateField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TagTemplateField.verify|verify} messages. - * @param message TagTemplateField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ITagTemplateField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TagTemplateField message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TagTemplateField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.TagTemplateField; - - /** - * Decodes a TagTemplateField message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TagTemplateField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.TagTemplateField; - - /** - * Verifies a TagTemplateField message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TagTemplateField message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TagTemplateField - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.TagTemplateField; - - /** - * Creates a plain object from a TagTemplateField message. Also converts values to other types if specified. - * @param message TagTemplateField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.TagTemplateField, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TagTemplateField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TagTemplateField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldType. */ - interface IFieldType { - - /** FieldType primitiveType */ - primitiveType?: (google.cloud.datacatalog.v1.FieldType.PrimitiveType|keyof typeof google.cloud.datacatalog.v1.FieldType.PrimitiveType|null); - - /** FieldType enumType */ - enumType?: (google.cloud.datacatalog.v1.FieldType.IEnumType|null); - } - - /** Represents a FieldType. */ - class FieldType implements IFieldType { - - /** - * Constructs a new FieldType. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IFieldType); - - /** FieldType primitiveType. */ - public primitiveType?: (google.cloud.datacatalog.v1.FieldType.PrimitiveType|keyof typeof google.cloud.datacatalog.v1.FieldType.PrimitiveType|null); - - /** FieldType enumType. */ - public enumType?: (google.cloud.datacatalog.v1.FieldType.IEnumType|null); - - /** FieldType typeDecl. */ - public typeDecl?: ("primitiveType"|"enumType"); - - /** - * Creates a new FieldType instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldType instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IFieldType): google.cloud.datacatalog.v1.FieldType; - - /** - * Encodes the specified FieldType message. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.verify|verify} messages. - * @param message FieldType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IFieldType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.verify|verify} messages. - * @param message FieldType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IFieldType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.FieldType; - - /** - * Decodes a FieldType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.FieldType; - - /** - * Verifies a FieldType message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldType - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.FieldType; - - /** - * Creates a plain object from a FieldType message. Also converts values to other types if specified. - * @param message FieldType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.FieldType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldType - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldType { - - /** PrimitiveType enum. */ - enum PrimitiveType { - PRIMITIVE_TYPE_UNSPECIFIED = 0, - DOUBLE = 1, - STRING = 2, - BOOL = 3, - TIMESTAMP = 4, - RICHTEXT = 5 - } - - /** Properties of an EnumType. */ - interface IEnumType { - - /** EnumType allowedValues */ - allowedValues?: (google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue[]|null); - } - - /** Represents an EnumType. */ - class EnumType implements IEnumType { - - /** - * Constructs a new EnumType. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.FieldType.IEnumType); - - /** EnumType allowedValues. */ - public allowedValues: google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue[]; - - /** - * Creates a new EnumType instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumType instance - */ - public static create(properties?: google.cloud.datacatalog.v1.FieldType.IEnumType): google.cloud.datacatalog.v1.FieldType.EnumType; - - /** - * Encodes the specified EnumType message. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.EnumType.verify|verify} messages. - * @param message EnumType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.FieldType.IEnumType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.EnumType.verify|verify} messages. - * @param message EnumType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.FieldType.IEnumType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.FieldType.EnumType; - - /** - * Decodes an EnumType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.FieldType.EnumType; - - /** - * Verifies an EnumType message. - * @param message Plain 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 EnumType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumType - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.FieldType.EnumType; - - /** - * Creates a plain object from an EnumType message. Also converts values to other types if specified. - * @param message EnumType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.FieldType.EnumType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumType - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumType { - - /** Properties of an EnumValue. */ - interface IEnumValue { - - /** EnumValue displayName */ - displayName?: (string|null); - } - - /** Represents an EnumValue. */ - class EnumValue implements IEnumValue { - - /** - * Constructs a new EnumValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue); - - /** EnumValue displayName. */ - public displayName: string; - - /** - * Creates a new EnumValue instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValue instance - */ - public static create(properties?: google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue): google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue; - - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue; - - /** - * Verifies an EnumValue message. - * @param message Plain 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 EnumValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @param message EnumValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a UsageStats. */ - interface IUsageStats { - - /** UsageStats totalCompletions */ - totalCompletions?: (number|null); - - /** UsageStats totalFailures */ - totalFailures?: (number|null); - - /** UsageStats totalCancellations */ - totalCancellations?: (number|null); - - /** UsageStats totalExecutionTimeForCompletionsMillis */ - totalExecutionTimeForCompletionsMillis?: (number|null); - } - - /** Represents a UsageStats. */ - class UsageStats implements IUsageStats { - - /** - * Constructs a new UsageStats. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUsageStats); - - /** UsageStats totalCompletions. */ - public totalCompletions: number; - - /** UsageStats totalFailures. */ - public totalFailures: number; - - /** UsageStats totalCancellations. */ - public totalCancellations: number; - - /** UsageStats totalExecutionTimeForCompletionsMillis. */ - public totalExecutionTimeForCompletionsMillis: number; - - /** - * Creates a new UsageStats instance using the specified properties. - * @param [properties] Properties to set - * @returns UsageStats instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUsageStats): google.cloud.datacatalog.v1.UsageStats; - - /** - * Encodes the specified UsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1.UsageStats.verify|verify} messages. - * @param message UsageStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUsageStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UsageStats message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UsageStats.verify|verify} messages. - * @param message UsageStats message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUsageStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UsageStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UsageStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UsageStats; - - /** - * Decodes a UsageStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UsageStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UsageStats; - - /** - * Verifies a UsageStats message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UsageStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UsageStats - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UsageStats; - - /** - * Creates a plain object from a UsageStats message. Also converts values to other types if specified. - * @param message UsageStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UsageStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UsageStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UsageStats - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UsageSignal. */ - interface IUsageSignal { - - /** UsageSignal updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** UsageSignal usageWithinTimeRange */ - usageWithinTimeRange?: ({ [k: string]: google.cloud.datacatalog.v1.IUsageStats }|null); - } - - /** Represents a UsageSignal. */ - class UsageSignal implements IUsageSignal { - - /** - * Constructs a new UsageSignal. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUsageSignal); - - /** UsageSignal updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** UsageSignal usageWithinTimeRange. */ - public usageWithinTimeRange: { [k: string]: google.cloud.datacatalog.v1.IUsageStats }; - - /** - * Creates a new UsageSignal instance using the specified properties. - * @param [properties] Properties to set - * @returns UsageSignal instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUsageSignal): google.cloud.datacatalog.v1.UsageSignal; - - /** - * Encodes the specified UsageSignal message. Does not implicitly {@link google.cloud.datacatalog.v1.UsageSignal.verify|verify} messages. - * @param message UsageSignal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUsageSignal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UsageSignal message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UsageSignal.verify|verify} messages. - * @param message UsageSignal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUsageSignal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UsageSignal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UsageSignal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UsageSignal; - - /** - * Decodes a UsageSignal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UsageSignal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UsageSignal; - - /** - * Verifies a UsageSignal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UsageSignal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UsageSignal - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UsageSignal; - - /** - * Creates a plain object from a UsageSignal message. Also converts values to other types if specified. - * @param message UsageSignal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UsageSignal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UsageSignal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UsageSignal - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a PolicyTagManager */ - class PolicyTagManager extends $protobuf.rpc.Service { - - /** - * Constructs a new PolicyTagManager 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 PolicyTagManager 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): PolicyTagManager; - - /** - * Calls CreateTaxonomy. - * @param request CreateTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Taxonomy - */ - public createTaxonomy(request: google.cloud.datacatalog.v1.ICreateTaxonomyRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.CreateTaxonomyCallback): void; - - /** - * Calls CreateTaxonomy. - * @param request CreateTaxonomyRequest message or plain object - * @returns Promise - */ - public createTaxonomy(request: google.cloud.datacatalog.v1.ICreateTaxonomyRequest): Promise; - - /** - * Calls DeleteTaxonomy. - * @param request DeleteTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTaxonomy(request: google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.DeleteTaxonomyCallback): void; - - /** - * Calls DeleteTaxonomy. - * @param request DeleteTaxonomyRequest message or plain object - * @returns Promise - */ - public deleteTaxonomy(request: google.cloud.datacatalog.v1.IDeleteTaxonomyRequest): Promise; - - /** - * Calls UpdateTaxonomy. - * @param request UpdateTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Taxonomy - */ - public updateTaxonomy(request: google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.UpdateTaxonomyCallback): void; - - /** - * Calls UpdateTaxonomy. - * @param request UpdateTaxonomyRequest message or plain object - * @returns Promise - */ - public updateTaxonomy(request: google.cloud.datacatalog.v1.IUpdateTaxonomyRequest): Promise; - - /** - * Calls ListTaxonomies. - * @param request ListTaxonomiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTaxonomiesResponse - */ - public listTaxonomies(request: google.cloud.datacatalog.v1.IListTaxonomiesRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomiesCallback): void; - - /** - * Calls ListTaxonomies. - * @param request ListTaxonomiesRequest message or plain object - * @returns Promise - */ - public listTaxonomies(request: google.cloud.datacatalog.v1.IListTaxonomiesRequest): Promise; - - /** - * Calls GetTaxonomy. - * @param request GetTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Taxonomy - */ - public getTaxonomy(request: google.cloud.datacatalog.v1.IGetTaxonomyRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.GetTaxonomyCallback): void; - - /** - * Calls GetTaxonomy. - * @param request GetTaxonomyRequest message or plain object - * @returns Promise - */ - public getTaxonomy(request: google.cloud.datacatalog.v1.IGetTaxonomyRequest): Promise; - - /** - * Calls CreatePolicyTag. - * @param request CreatePolicyTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PolicyTag - */ - public createPolicyTag(request: google.cloud.datacatalog.v1.ICreatePolicyTagRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.CreatePolicyTagCallback): void; - - /** - * Calls CreatePolicyTag. - * @param request CreatePolicyTagRequest message or plain object - * @returns Promise - */ - public createPolicyTag(request: google.cloud.datacatalog.v1.ICreatePolicyTagRequest): Promise; - - /** - * Calls DeletePolicyTag. - * @param request DeletePolicyTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deletePolicyTag(request: google.cloud.datacatalog.v1.IDeletePolicyTagRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.DeletePolicyTagCallback): void; - - /** - * Calls DeletePolicyTag. - * @param request DeletePolicyTagRequest message or plain object - * @returns Promise - */ - public deletePolicyTag(request: google.cloud.datacatalog.v1.IDeletePolicyTagRequest): Promise; - - /** - * Calls UpdatePolicyTag. - * @param request UpdatePolicyTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PolicyTag - */ - public updatePolicyTag(request: google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.UpdatePolicyTagCallback): void; - - /** - * Calls UpdatePolicyTag. - * @param request UpdatePolicyTagRequest message or plain object - * @returns Promise - */ - public updatePolicyTag(request: google.cloud.datacatalog.v1.IUpdatePolicyTagRequest): Promise; - - /** - * Calls ListPolicyTags. - * @param request ListPolicyTagsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPolicyTagsResponse - */ - public listPolicyTags(request: google.cloud.datacatalog.v1.IListPolicyTagsRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTagsCallback): void; - - /** - * Calls ListPolicyTags. - * @param request ListPolicyTagsRequest message or plain object - * @returns Promise - */ - public listPolicyTags(request: google.cloud.datacatalog.v1.IListPolicyTagsRequest): Promise; - - /** - * Calls GetPolicyTag. - * @param request GetPolicyTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PolicyTag - */ - public getPolicyTag(request: google.cloud.datacatalog.v1.IGetPolicyTagRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.GetPolicyTagCallback): void; - - /** - * Calls GetPolicyTag. - * @param request GetPolicyTagRequest message or plain object - * @returns Promise - */ - public getPolicyTag(request: google.cloud.datacatalog.v1.IGetPolicyTagRequest): Promise; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.GetIamPolicyCallback): void; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.SetIamPolicyCallback): void; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.datacatalog.v1.PolicyTagManager.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace PolicyTagManager { - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|createTaxonomy}. - * @param error Error, if any - * @param [response] Taxonomy - */ - type CreateTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Taxonomy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|deleteTaxonomy}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTaxonomyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|updateTaxonomy}. - * @param error Error, if any - * @param [response] Taxonomy - */ - type UpdateTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Taxonomy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|listTaxonomies}. - * @param error Error, if any - * @param [response] ListTaxonomiesResponse - */ - type ListTaxonomiesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.ListTaxonomiesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|getTaxonomy}. - * @param error Error, if any - * @param [response] Taxonomy - */ - type GetTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Taxonomy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|createPolicyTag}. - * @param error Error, if any - * @param [response] PolicyTag - */ - type CreatePolicyTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.PolicyTag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|deletePolicyTag}. - * @param error Error, if any - * @param [response] Empty - */ - type DeletePolicyTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|updatePolicyTag}. - * @param error Error, if any - * @param [response] PolicyTag - */ - type UpdatePolicyTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.PolicyTag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|listPolicyTags}. - * @param error Error, if any - * @param [response] ListPolicyTagsResponse - */ - type ListPolicyTagsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.ListPolicyTagsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|getPolicyTag}. - * @param error Error, if any - * @param [response] PolicyTag - */ - type GetPolicyTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.PolicyTag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a Taxonomy. */ - interface ITaxonomy { - - /** Taxonomy name */ - name?: (string|null); - - /** Taxonomy displayName */ - displayName?: (string|null); - - /** Taxonomy description */ - description?: (string|null); - - /** Taxonomy policyTagCount */ - policyTagCount?: (number|null); - - /** Taxonomy taxonomyTimestamps */ - taxonomyTimestamps?: (google.cloud.datacatalog.v1.ISystemTimestamps|null); - - /** Taxonomy activatedPolicyTypes */ - activatedPolicyTypes?: (google.cloud.datacatalog.v1.Taxonomy.PolicyType[]|null); - } - - /** Represents a Taxonomy. */ - class Taxonomy implements ITaxonomy { - - /** - * Constructs a new Taxonomy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ITaxonomy); - - /** Taxonomy name. */ - public name: string; - - /** Taxonomy displayName. */ - public displayName: string; - - /** Taxonomy description. */ - public description: string; - - /** Taxonomy policyTagCount. */ - public policyTagCount: number; - - /** Taxonomy taxonomyTimestamps. */ - public taxonomyTimestamps?: (google.cloud.datacatalog.v1.ISystemTimestamps|null); - - /** Taxonomy activatedPolicyTypes. */ - public activatedPolicyTypes: google.cloud.datacatalog.v1.Taxonomy.PolicyType[]; - - /** - * Creates a new Taxonomy instance using the specified properties. - * @param [properties] Properties to set - * @returns Taxonomy instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ITaxonomy): google.cloud.datacatalog.v1.Taxonomy; - - /** - * Encodes the specified Taxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.verify|verify} messages. - * @param message Taxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ITaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Taxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.verify|verify} messages. - * @param message Taxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ITaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Taxonomy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Taxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.Taxonomy; - - /** - * Decodes a Taxonomy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Taxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.Taxonomy; - - /** - * Verifies a Taxonomy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Taxonomy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Taxonomy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.Taxonomy; - - /** - * Creates a plain object from a Taxonomy message. Also converts values to other types if specified. - * @param message Taxonomy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.Taxonomy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Taxonomy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Taxonomy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Taxonomy { - - /** PolicyType enum. */ - enum PolicyType { - POLICY_TYPE_UNSPECIFIED = 0, - FINE_GRAINED_ACCESS_CONTROL = 1 - } - } - - /** Properties of a PolicyTag. */ - interface IPolicyTag { - - /** PolicyTag name */ - name?: (string|null); - - /** PolicyTag displayName */ - displayName?: (string|null); - - /** PolicyTag description */ - description?: (string|null); - - /** PolicyTag parentPolicyTag */ - parentPolicyTag?: (string|null); - - /** PolicyTag childPolicyTags */ - childPolicyTags?: (string[]|null); - } - - /** Represents a PolicyTag. */ - class PolicyTag implements IPolicyTag { - - /** - * Constructs a new PolicyTag. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IPolicyTag); - - /** PolicyTag name. */ - public name: string; - - /** PolicyTag displayName. */ - public displayName: string; - - /** PolicyTag description. */ - public description: string; - - /** PolicyTag parentPolicyTag. */ - public parentPolicyTag: string; - - /** PolicyTag childPolicyTags. */ - public childPolicyTags: string[]; - - /** - * Creates a new PolicyTag instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyTag instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IPolicyTag): google.cloud.datacatalog.v1.PolicyTag; - - /** - * Encodes the specified PolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1.PolicyTag.verify|verify} messages. - * @param message PolicyTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PolicyTag.verify|verify} messages. - * @param message PolicyTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyTag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.PolicyTag; - - /** - * Decodes a PolicyTag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.PolicyTag; - - /** - * Verifies a PolicyTag message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PolicyTag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyTag - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.PolicyTag; - - /** - * Creates a plain object from a PolicyTag message. Also converts values to other types if specified. - * @param message PolicyTag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.PolicyTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PolicyTag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PolicyTag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTaxonomyRequest. */ - interface ICreateTaxonomyRequest { - - /** CreateTaxonomyRequest parent */ - parent?: (string|null); - - /** CreateTaxonomyRequest taxonomy */ - taxonomy?: (google.cloud.datacatalog.v1.ITaxonomy|null); - } - - /** Represents a CreateTaxonomyRequest. */ - class CreateTaxonomyRequest implements ICreateTaxonomyRequest { - - /** - * Constructs a new CreateTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICreateTaxonomyRequest); - - /** CreateTaxonomyRequest parent. */ - public parent: string; - - /** CreateTaxonomyRequest taxonomy. */ - public taxonomy?: (google.cloud.datacatalog.v1.ITaxonomy|null); - - /** - * Creates a new CreateTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTaxonomyRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICreateTaxonomyRequest): google.cloud.datacatalog.v1.CreateTaxonomyRequest; - - /** - * Encodes the specified CreateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTaxonomyRequest.verify|verify} messages. - * @param message CreateTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICreateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTaxonomyRequest.verify|verify} messages. - * @param message CreateTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICreateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.CreateTaxonomyRequest; - - /** - * Decodes a CreateTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.CreateTaxonomyRequest; - - /** - * Verifies a CreateTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CreateTaxonomyRequest; - - /** - * Creates a plain object from a CreateTaxonomyRequest message. Also converts values to other types if specified. - * @param message CreateTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CreateTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTaxonomyRequest. */ - interface IDeleteTaxonomyRequest { - - /** DeleteTaxonomyRequest name */ - name?: (string|null); - } - - /** Represents a DeleteTaxonomyRequest. */ - class DeleteTaxonomyRequest implements IDeleteTaxonomyRequest { - - /** - * Constructs a new DeleteTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDeleteTaxonomyRequest); - - /** DeleteTaxonomyRequest name. */ - public name: string; - - /** - * Creates a new DeleteTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTaxonomyRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDeleteTaxonomyRequest): google.cloud.datacatalog.v1.DeleteTaxonomyRequest; - - /** - * Encodes the specified DeleteTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTaxonomyRequest.verify|verify} messages. - * @param message DeleteTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTaxonomyRequest.verify|verify} messages. - * @param message DeleteTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DeleteTaxonomyRequest; - - /** - * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DeleteTaxonomyRequest; - - /** - * Verifies a DeleteTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DeleteTaxonomyRequest; - - /** - * Creates a plain object from a DeleteTaxonomyRequest message. Also converts values to other types if specified. - * @param message DeleteTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DeleteTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTaxonomyRequest. */ - interface IUpdateTaxonomyRequest { - - /** UpdateTaxonomyRequest taxonomy */ - taxonomy?: (google.cloud.datacatalog.v1.ITaxonomy|null); - - /** UpdateTaxonomyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTaxonomyRequest. */ - class UpdateTaxonomyRequest implements IUpdateTaxonomyRequest { - - /** - * Constructs a new UpdateTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUpdateTaxonomyRequest); - - /** UpdateTaxonomyRequest taxonomy. */ - public taxonomy?: (google.cloud.datacatalog.v1.ITaxonomy|null); - - /** UpdateTaxonomyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTaxonomyRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUpdateTaxonomyRequest): google.cloud.datacatalog.v1.UpdateTaxonomyRequest; - - /** - * Encodes the specified UpdateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTaxonomyRequest.verify|verify} messages. - * @param message UpdateTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTaxonomyRequest.verify|verify} messages. - * @param message UpdateTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UpdateTaxonomyRequest; - - /** - * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UpdateTaxonomyRequest; - - /** - * Verifies an UpdateTaxonomyRequest message. - * @param message Plain 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 UpdateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UpdateTaxonomyRequest; - - /** - * Creates a plain object from an UpdateTaxonomyRequest message. Also converts values to other types if specified. - * @param message UpdateTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UpdateTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTaxonomiesRequest. */ - interface IListTaxonomiesRequest { - - /** ListTaxonomiesRequest parent */ - parent?: (string|null); - - /** ListTaxonomiesRequest pageSize */ - pageSize?: (number|null); - - /** ListTaxonomiesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListTaxonomiesRequest. */ - class ListTaxonomiesRequest implements IListTaxonomiesRequest { - - /** - * Constructs a new ListTaxonomiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListTaxonomiesRequest); - - /** ListTaxonomiesRequest parent. */ - public parent: string; - - /** ListTaxonomiesRequest pageSize. */ - public pageSize: number; - - /** ListTaxonomiesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListTaxonomiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTaxonomiesRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListTaxonomiesRequest): google.cloud.datacatalog.v1.ListTaxonomiesRequest; - - /** - * Encodes the specified ListTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListTaxonomiesRequest.verify|verify} messages. - * @param message ListTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListTaxonomiesRequest.verify|verify} messages. - * @param message ListTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTaxonomiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListTaxonomiesRequest; - - /** - * Decodes a ListTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListTaxonomiesRequest; - - /** - * Verifies a ListTaxonomiesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTaxonomiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListTaxonomiesRequest; - - /** - * Creates a plain object from a ListTaxonomiesRequest message. Also converts values to other types if specified. - * @param message ListTaxonomiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTaxonomiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTaxonomiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTaxonomiesResponse. */ - interface IListTaxonomiesResponse { - - /** ListTaxonomiesResponse taxonomies */ - taxonomies?: (google.cloud.datacatalog.v1.ITaxonomy[]|null); - - /** ListTaxonomiesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListTaxonomiesResponse. */ - class ListTaxonomiesResponse implements IListTaxonomiesResponse { - - /** - * Constructs a new ListTaxonomiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListTaxonomiesResponse); - - /** ListTaxonomiesResponse taxonomies. */ - public taxonomies: google.cloud.datacatalog.v1.ITaxonomy[]; - - /** ListTaxonomiesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTaxonomiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTaxonomiesResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListTaxonomiesResponse): google.cloud.datacatalog.v1.ListTaxonomiesResponse; - - /** - * Encodes the specified ListTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListTaxonomiesResponse.verify|verify} messages. - * @param message ListTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListTaxonomiesResponse.verify|verify} messages. - * @param message ListTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTaxonomiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListTaxonomiesResponse; - - /** - * Decodes a ListTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListTaxonomiesResponse; - - /** - * Verifies a ListTaxonomiesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTaxonomiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListTaxonomiesResponse; - - /** - * Creates a plain object from a ListTaxonomiesResponse message. Also converts values to other types if specified. - * @param message ListTaxonomiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTaxonomiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTaxonomiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTaxonomyRequest. */ - interface IGetTaxonomyRequest { - - /** GetTaxonomyRequest name */ - name?: (string|null); - } - - /** Represents a GetTaxonomyRequest. */ - class GetTaxonomyRequest implements IGetTaxonomyRequest { - - /** - * Constructs a new GetTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IGetTaxonomyRequest); - - /** GetTaxonomyRequest name. */ - public name: string; - - /** - * Creates a new GetTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTaxonomyRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IGetTaxonomyRequest): google.cloud.datacatalog.v1.GetTaxonomyRequest; - - /** - * Encodes the specified GetTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetTaxonomyRequest.verify|verify} messages. - * @param message GetTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IGetTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetTaxonomyRequest.verify|verify} messages. - * @param message GetTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IGetTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.GetTaxonomyRequest; - - /** - * Decodes a GetTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.GetTaxonomyRequest; - - /** - * Verifies a GetTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.GetTaxonomyRequest; - - /** - * Creates a plain object from a GetTaxonomyRequest message. Also converts values to other types if specified. - * @param message GetTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.GetTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreatePolicyTagRequest. */ - interface ICreatePolicyTagRequest { - - /** CreatePolicyTagRequest parent */ - parent?: (string|null); - - /** CreatePolicyTagRequest policyTag */ - policyTag?: (google.cloud.datacatalog.v1.IPolicyTag|null); - } - - /** Represents a CreatePolicyTagRequest. */ - class CreatePolicyTagRequest implements ICreatePolicyTagRequest { - - /** - * Constructs a new CreatePolicyTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICreatePolicyTagRequest); - - /** CreatePolicyTagRequest parent. */ - public parent: string; - - /** CreatePolicyTagRequest policyTag. */ - public policyTag?: (google.cloud.datacatalog.v1.IPolicyTag|null); - - /** - * Creates a new CreatePolicyTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreatePolicyTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICreatePolicyTagRequest): google.cloud.datacatalog.v1.CreatePolicyTagRequest; - - /** - * Encodes the specified CreatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreatePolicyTagRequest.verify|verify} messages. - * @param message CreatePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICreatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreatePolicyTagRequest.verify|verify} messages. - * @param message CreatePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICreatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreatePolicyTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.CreatePolicyTagRequest; - - /** - * Decodes a CreatePolicyTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.CreatePolicyTagRequest; - - /** - * Verifies a CreatePolicyTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreatePolicyTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CreatePolicyTagRequest; - - /** - * Creates a plain object from a CreatePolicyTagRequest message. Also converts values to other types if specified. - * @param message CreatePolicyTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CreatePolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreatePolicyTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreatePolicyTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeletePolicyTagRequest. */ - interface IDeletePolicyTagRequest { - - /** DeletePolicyTagRequest name */ - name?: (string|null); - } - - /** Represents a DeletePolicyTagRequest. */ - class DeletePolicyTagRequest implements IDeletePolicyTagRequest { - - /** - * Constructs a new DeletePolicyTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IDeletePolicyTagRequest); - - /** DeletePolicyTagRequest name. */ - public name: string; - - /** - * Creates a new DeletePolicyTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePolicyTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IDeletePolicyTagRequest): google.cloud.datacatalog.v1.DeletePolicyTagRequest; - - /** - * Encodes the specified DeletePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeletePolicyTagRequest.verify|verify} messages. - * @param message DeletePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IDeletePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeletePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeletePolicyTagRequest.verify|verify} messages. - * @param message DeletePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IDeletePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeletePolicyTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.DeletePolicyTagRequest; - - /** - * Decodes a DeletePolicyTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.DeletePolicyTagRequest; - - /** - * Verifies a DeletePolicyTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeletePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePolicyTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.DeletePolicyTagRequest; - - /** - * Creates a plain object from a DeletePolicyTagRequest message. Also converts values to other types if specified. - * @param message DeletePolicyTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.DeletePolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeletePolicyTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeletePolicyTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePolicyTagRequest. */ - interface IUpdatePolicyTagRequest { - - /** UpdatePolicyTagRequest policyTag */ - policyTag?: (google.cloud.datacatalog.v1.IPolicyTag|null); - - /** UpdatePolicyTagRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdatePolicyTagRequest. */ - class UpdatePolicyTagRequest implements IUpdatePolicyTagRequest { - - /** - * Constructs a new UpdatePolicyTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IUpdatePolicyTagRequest); - - /** UpdatePolicyTagRequest policyTag. */ - public policyTag?: (google.cloud.datacatalog.v1.IPolicyTag|null); - - /** UpdatePolicyTagRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdatePolicyTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePolicyTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IUpdatePolicyTagRequest): google.cloud.datacatalog.v1.UpdatePolicyTagRequest; - - /** - * Encodes the specified UpdatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdatePolicyTagRequest.verify|verify} messages. - * @param message UpdatePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdatePolicyTagRequest.verify|verify} messages. - * @param message UpdatePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.UpdatePolicyTagRequest; - - /** - * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.UpdatePolicyTagRequest; - - /** - * Verifies an UpdatePolicyTagRequest message. - * @param message Plain 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 UpdatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePolicyTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.UpdatePolicyTagRequest; - - /** - * Creates a plain object from an UpdatePolicyTagRequest message. Also converts values to other types if specified. - * @param message UpdatePolicyTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.UpdatePolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdatePolicyTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePolicyTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPolicyTagsRequest. */ - interface IListPolicyTagsRequest { - - /** ListPolicyTagsRequest parent */ - parent?: (string|null); - - /** ListPolicyTagsRequest pageSize */ - pageSize?: (number|null); - - /** ListPolicyTagsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListPolicyTagsRequest. */ - class ListPolicyTagsRequest implements IListPolicyTagsRequest { - - /** - * Constructs a new ListPolicyTagsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListPolicyTagsRequest); - - /** ListPolicyTagsRequest parent. */ - public parent: string; - - /** ListPolicyTagsRequest pageSize. */ - public pageSize: number; - - /** ListPolicyTagsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListPolicyTagsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPolicyTagsRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListPolicyTagsRequest): google.cloud.datacatalog.v1.ListPolicyTagsRequest; - - /** - * Encodes the specified ListPolicyTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListPolicyTagsRequest.verify|verify} messages. - * @param message ListPolicyTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListPolicyTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPolicyTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListPolicyTagsRequest.verify|verify} messages. - * @param message ListPolicyTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListPolicyTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPolicyTagsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPolicyTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListPolicyTagsRequest; - - /** - * Decodes a ListPolicyTagsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPolicyTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListPolicyTagsRequest; - - /** - * Verifies a ListPolicyTagsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPolicyTagsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPolicyTagsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListPolicyTagsRequest; - - /** - * Creates a plain object from a ListPolicyTagsRequest message. Also converts values to other types if specified. - * @param message ListPolicyTagsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListPolicyTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPolicyTagsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPolicyTagsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPolicyTagsResponse. */ - interface IListPolicyTagsResponse { - - /** ListPolicyTagsResponse policyTags */ - policyTags?: (google.cloud.datacatalog.v1.IPolicyTag[]|null); - - /** ListPolicyTagsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListPolicyTagsResponse. */ - class ListPolicyTagsResponse implements IListPolicyTagsResponse { - - /** - * Constructs a new ListPolicyTagsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IListPolicyTagsResponse); - - /** ListPolicyTagsResponse policyTags. */ - public policyTags: google.cloud.datacatalog.v1.IPolicyTag[]; - - /** ListPolicyTagsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListPolicyTagsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPolicyTagsResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IListPolicyTagsResponse): google.cloud.datacatalog.v1.ListPolicyTagsResponse; - - /** - * Encodes the specified ListPolicyTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListPolicyTagsResponse.verify|verify} messages. - * @param message ListPolicyTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IListPolicyTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPolicyTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListPolicyTagsResponse.verify|verify} messages. - * @param message ListPolicyTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IListPolicyTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPolicyTagsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPolicyTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ListPolicyTagsResponse; - - /** - * Decodes a ListPolicyTagsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPolicyTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ListPolicyTagsResponse; - - /** - * Verifies a ListPolicyTagsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPolicyTagsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPolicyTagsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ListPolicyTagsResponse; - - /** - * Creates a plain object from a ListPolicyTagsResponse message. Also converts values to other types if specified. - * @param message ListPolicyTagsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ListPolicyTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPolicyTagsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPolicyTagsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPolicyTagRequest. */ - interface IGetPolicyTagRequest { - - /** GetPolicyTagRequest name */ - name?: (string|null); - } - - /** Represents a GetPolicyTagRequest. */ - class GetPolicyTagRequest implements IGetPolicyTagRequest { - - /** - * Constructs a new GetPolicyTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IGetPolicyTagRequest); - - /** GetPolicyTagRequest name. */ - public name: string; - - /** - * Creates a new GetPolicyTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPolicyTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IGetPolicyTagRequest): google.cloud.datacatalog.v1.GetPolicyTagRequest; - - /** - * Encodes the specified GetPolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetPolicyTagRequest.verify|verify} messages. - * @param message GetPolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IGetPolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetPolicyTagRequest.verify|verify} messages. - * @param message GetPolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IGetPolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPolicyTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.GetPolicyTagRequest; - - /** - * Decodes a GetPolicyTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.GetPolicyTagRequest; - - /** - * Verifies a GetPolicyTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPolicyTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.GetPolicyTagRequest; - - /** - * Creates a plain object from a GetPolicyTagRequest message. Also converts values to other types if specified. - * @param message GetPolicyTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.GetPolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPolicyTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPolicyTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a PolicyTagManagerSerialization */ - class PolicyTagManagerSerialization extends $protobuf.rpc.Service { - - /** - * Constructs a new PolicyTagManagerSerialization 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 PolicyTagManagerSerialization 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): PolicyTagManagerSerialization; - - /** - * Calls ReplaceTaxonomy. - * @param request ReplaceTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Taxonomy - */ - public replaceTaxonomy(request: google.cloud.datacatalog.v1.IReplaceTaxonomyRequest, callback: google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ReplaceTaxonomyCallback): void; - - /** - * Calls ReplaceTaxonomy. - * @param request ReplaceTaxonomyRequest message or plain object - * @returns Promise - */ - public replaceTaxonomy(request: google.cloud.datacatalog.v1.IReplaceTaxonomyRequest): Promise; - - /** - * Calls ImportTaxonomies. - * @param request ImportTaxonomiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ImportTaxonomiesResponse - */ - public importTaxonomies(request: google.cloud.datacatalog.v1.IImportTaxonomiesRequest, callback: google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomiesCallback): void; - - /** - * Calls ImportTaxonomies. - * @param request ImportTaxonomiesRequest message or plain object - * @returns Promise - */ - public importTaxonomies(request: google.cloud.datacatalog.v1.IImportTaxonomiesRequest): Promise; - - /** - * Calls ExportTaxonomies. - * @param request ExportTaxonomiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExportTaxonomiesResponse - */ - public exportTaxonomies(request: google.cloud.datacatalog.v1.IExportTaxonomiesRequest, callback: google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomiesCallback): void; - - /** - * Calls ExportTaxonomies. - * @param request ExportTaxonomiesRequest message or plain object - * @returns Promise - */ - public exportTaxonomies(request: google.cloud.datacatalog.v1.IExportTaxonomiesRequest): Promise; - } - - namespace PolicyTagManagerSerialization { - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManagerSerialization|replaceTaxonomy}. - * @param error Error, if any - * @param [response] Taxonomy - */ - type ReplaceTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.Taxonomy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManagerSerialization|importTaxonomies}. - * @param error Error, if any - * @param [response] ImportTaxonomiesResponse - */ - type ImportTaxonomiesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.ImportTaxonomiesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManagerSerialization|exportTaxonomies}. - * @param error Error, if any - * @param [response] ExportTaxonomiesResponse - */ - type ExportTaxonomiesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1.ExportTaxonomiesResponse) => void; - } - - /** Properties of a SerializedTaxonomy. */ - interface ISerializedTaxonomy { - - /** SerializedTaxonomy displayName */ - displayName?: (string|null); - - /** SerializedTaxonomy description */ - description?: (string|null); - - /** SerializedTaxonomy policyTags */ - policyTags?: (google.cloud.datacatalog.v1.ISerializedPolicyTag[]|null); - - /** SerializedTaxonomy activatedPolicyTypes */ - activatedPolicyTypes?: (google.cloud.datacatalog.v1.Taxonomy.PolicyType[]|null); - } - - /** Represents a SerializedTaxonomy. */ - class SerializedTaxonomy implements ISerializedTaxonomy { - - /** - * Constructs a new SerializedTaxonomy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ISerializedTaxonomy); - - /** SerializedTaxonomy displayName. */ - public displayName: string; - - /** SerializedTaxonomy description. */ - public description: string; - - /** SerializedTaxonomy policyTags. */ - public policyTags: google.cloud.datacatalog.v1.ISerializedPolicyTag[]; - - /** SerializedTaxonomy activatedPolicyTypes. */ - public activatedPolicyTypes: google.cloud.datacatalog.v1.Taxonomy.PolicyType[]; - - /** - * Creates a new SerializedTaxonomy instance using the specified properties. - * @param [properties] Properties to set - * @returns SerializedTaxonomy instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ISerializedTaxonomy): google.cloud.datacatalog.v1.SerializedTaxonomy; - - /** - * Encodes the specified SerializedTaxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1.SerializedTaxonomy.verify|verify} messages. - * @param message SerializedTaxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ISerializedTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SerializedTaxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SerializedTaxonomy.verify|verify} messages. - * @param message SerializedTaxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ISerializedTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SerializedTaxonomy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SerializedTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.SerializedTaxonomy; - - /** - * Decodes a SerializedTaxonomy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SerializedTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.SerializedTaxonomy; - - /** - * Verifies a SerializedTaxonomy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SerializedTaxonomy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SerializedTaxonomy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SerializedTaxonomy; - - /** - * Creates a plain object from a SerializedTaxonomy message. Also converts values to other types if specified. - * @param message SerializedTaxonomy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.SerializedTaxonomy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SerializedTaxonomy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SerializedTaxonomy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SerializedPolicyTag. */ - interface ISerializedPolicyTag { - - /** SerializedPolicyTag policyTag */ - policyTag?: (string|null); - - /** SerializedPolicyTag displayName */ - displayName?: (string|null); - - /** SerializedPolicyTag description */ - description?: (string|null); - - /** SerializedPolicyTag childPolicyTags */ - childPolicyTags?: (google.cloud.datacatalog.v1.ISerializedPolicyTag[]|null); - } - - /** Represents a SerializedPolicyTag. */ - class SerializedPolicyTag implements ISerializedPolicyTag { - - /** - * Constructs a new SerializedPolicyTag. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ISerializedPolicyTag); - - /** SerializedPolicyTag policyTag. */ - public policyTag: string; - - /** SerializedPolicyTag displayName. */ - public displayName: string; - - /** SerializedPolicyTag description. */ - public description: string; - - /** SerializedPolicyTag childPolicyTags. */ - public childPolicyTags: google.cloud.datacatalog.v1.ISerializedPolicyTag[]; - - /** - * Creates a new SerializedPolicyTag instance using the specified properties. - * @param [properties] Properties to set - * @returns SerializedPolicyTag instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ISerializedPolicyTag): google.cloud.datacatalog.v1.SerializedPolicyTag; - - /** - * Encodes the specified SerializedPolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1.SerializedPolicyTag.verify|verify} messages. - * @param message SerializedPolicyTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ISerializedPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SerializedPolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SerializedPolicyTag.verify|verify} messages. - * @param message SerializedPolicyTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ISerializedPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SerializedPolicyTag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SerializedPolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.SerializedPolicyTag; - - /** - * Decodes a SerializedPolicyTag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SerializedPolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.SerializedPolicyTag; - - /** - * Verifies a SerializedPolicyTag message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SerializedPolicyTag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SerializedPolicyTag - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.SerializedPolicyTag; - - /** - * Creates a plain object from a SerializedPolicyTag message. Also converts values to other types if specified. - * @param message SerializedPolicyTag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.SerializedPolicyTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SerializedPolicyTag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SerializedPolicyTag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReplaceTaxonomyRequest. */ - interface IReplaceTaxonomyRequest { - - /** ReplaceTaxonomyRequest name */ - name?: (string|null); - - /** ReplaceTaxonomyRequest serializedTaxonomy */ - serializedTaxonomy?: (google.cloud.datacatalog.v1.ISerializedTaxonomy|null); - } - - /** Represents a ReplaceTaxonomyRequest. */ - class ReplaceTaxonomyRequest implements IReplaceTaxonomyRequest { - - /** - * Constructs a new ReplaceTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IReplaceTaxonomyRequest); - - /** ReplaceTaxonomyRequest name. */ - public name: string; - - /** ReplaceTaxonomyRequest serializedTaxonomy. */ - public serializedTaxonomy?: (google.cloud.datacatalog.v1.ISerializedTaxonomy|null); - - /** - * Creates a new ReplaceTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ReplaceTaxonomyRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IReplaceTaxonomyRequest): google.cloud.datacatalog.v1.ReplaceTaxonomyRequest; - - /** - * Encodes the specified ReplaceTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ReplaceTaxonomyRequest.verify|verify} messages. - * @param message ReplaceTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IReplaceTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReplaceTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReplaceTaxonomyRequest.verify|verify} messages. - * @param message ReplaceTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IReplaceTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReplaceTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReplaceTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ReplaceTaxonomyRequest; - - /** - * Decodes a ReplaceTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReplaceTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ReplaceTaxonomyRequest; - - /** - * Verifies a ReplaceTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReplaceTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReplaceTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ReplaceTaxonomyRequest; - - /** - * Creates a plain object from a ReplaceTaxonomyRequest message. Also converts values to other types if specified. - * @param message ReplaceTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ReplaceTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReplaceTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReplaceTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportTaxonomiesRequest. */ - interface IImportTaxonomiesRequest { - - /** ImportTaxonomiesRequest parent */ - parent?: (string|null); - - /** ImportTaxonomiesRequest inlineSource */ - inlineSource?: (google.cloud.datacatalog.v1.IInlineSource|null); - - /** ImportTaxonomiesRequest crossRegionalSource */ - crossRegionalSource?: (google.cloud.datacatalog.v1.ICrossRegionalSource|null); - } - - /** Represents an ImportTaxonomiesRequest. */ - class ImportTaxonomiesRequest implements IImportTaxonomiesRequest { - - /** - * Constructs a new ImportTaxonomiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IImportTaxonomiesRequest); - - /** ImportTaxonomiesRequest parent. */ - public parent: string; - - /** ImportTaxonomiesRequest inlineSource. */ - public inlineSource?: (google.cloud.datacatalog.v1.IInlineSource|null); - - /** ImportTaxonomiesRequest crossRegionalSource. */ - public crossRegionalSource?: (google.cloud.datacatalog.v1.ICrossRegionalSource|null); - - /** ImportTaxonomiesRequest source. */ - public source?: ("inlineSource"|"crossRegionalSource"); - - /** - * Creates a new ImportTaxonomiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportTaxonomiesRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IImportTaxonomiesRequest): google.cloud.datacatalog.v1.ImportTaxonomiesRequest; - - /** - * Encodes the specified ImportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportTaxonomiesRequest.verify|verify} messages. - * @param message ImportTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IImportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportTaxonomiesRequest.verify|verify} messages. - * @param message ImportTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IImportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ImportTaxonomiesRequest; - - /** - * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ImportTaxonomiesRequest; - - /** - * Verifies an ImportTaxonomiesRequest message. - * @param message Plain 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 ImportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportTaxonomiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ImportTaxonomiesRequest; - - /** - * Creates a plain object from an ImportTaxonomiesRequest message. Also converts values to other types if specified. - * @param message ImportTaxonomiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ImportTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportTaxonomiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportTaxonomiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InlineSource. */ - interface IInlineSource { - - /** InlineSource taxonomies */ - taxonomies?: (google.cloud.datacatalog.v1.ISerializedTaxonomy[]|null); - } - - /** Represents an InlineSource. */ - class InlineSource implements IInlineSource { - - /** - * Constructs a new InlineSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IInlineSource); - - /** InlineSource taxonomies. */ - public taxonomies: google.cloud.datacatalog.v1.ISerializedTaxonomy[]; - - /** - * Creates a new InlineSource instance using the specified properties. - * @param [properties] Properties to set - * @returns InlineSource instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IInlineSource): google.cloud.datacatalog.v1.InlineSource; - - /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.datacatalog.v1.InlineSource.verify|verify} messages. - * @param message InlineSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.InlineSource.verify|verify} messages. - * @param message InlineSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InlineSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.InlineSource; - - /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.InlineSource; - - /** - * Verifies an InlineSource message. - * @param message Plain 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 InlineSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InlineSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.InlineSource; - - /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @param message InlineSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InlineSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InlineSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CrossRegionalSource. */ - interface ICrossRegionalSource { - - /** CrossRegionalSource taxonomy */ - taxonomy?: (string|null); - } - - /** Represents a CrossRegionalSource. */ - class CrossRegionalSource implements ICrossRegionalSource { - - /** - * Constructs a new CrossRegionalSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.ICrossRegionalSource); - - /** CrossRegionalSource taxonomy. */ - public taxonomy: string; - - /** - * Creates a new CrossRegionalSource instance using the specified properties. - * @param [properties] Properties to set - * @returns CrossRegionalSource instance - */ - public static create(properties?: google.cloud.datacatalog.v1.ICrossRegionalSource): google.cloud.datacatalog.v1.CrossRegionalSource; - - /** - * Encodes the specified CrossRegionalSource message. Does not implicitly {@link google.cloud.datacatalog.v1.CrossRegionalSource.verify|verify} messages. - * @param message CrossRegionalSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.ICrossRegionalSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CrossRegionalSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CrossRegionalSource.verify|verify} messages. - * @param message CrossRegionalSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.ICrossRegionalSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CrossRegionalSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CrossRegionalSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.CrossRegionalSource; - - /** - * Decodes a CrossRegionalSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CrossRegionalSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.CrossRegionalSource; - - /** - * Verifies a CrossRegionalSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CrossRegionalSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CrossRegionalSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.CrossRegionalSource; - - /** - * Creates a plain object from a CrossRegionalSource message. Also converts values to other types if specified. - * @param message CrossRegionalSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.CrossRegionalSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CrossRegionalSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CrossRegionalSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportTaxonomiesResponse. */ - interface IImportTaxonomiesResponse { - - /** ImportTaxonomiesResponse taxonomies */ - taxonomies?: (google.cloud.datacatalog.v1.ITaxonomy[]|null); - } - - /** Represents an ImportTaxonomiesResponse. */ - class ImportTaxonomiesResponse implements IImportTaxonomiesResponse { - - /** - * Constructs a new ImportTaxonomiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IImportTaxonomiesResponse); - - /** ImportTaxonomiesResponse taxonomies. */ - public taxonomies: google.cloud.datacatalog.v1.ITaxonomy[]; - - /** - * Creates a new ImportTaxonomiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportTaxonomiesResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IImportTaxonomiesResponse): google.cloud.datacatalog.v1.ImportTaxonomiesResponse; - - /** - * Encodes the specified ImportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportTaxonomiesResponse.verify|verify} messages. - * @param message ImportTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IImportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportTaxonomiesResponse.verify|verify} messages. - * @param message ImportTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IImportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ImportTaxonomiesResponse; - - /** - * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ImportTaxonomiesResponse; - - /** - * Verifies an ImportTaxonomiesResponse message. - * @param message Plain 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 ImportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportTaxonomiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ImportTaxonomiesResponse; - - /** - * Creates a plain object from an ImportTaxonomiesResponse message. Also converts values to other types if specified. - * @param message ImportTaxonomiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ImportTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportTaxonomiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportTaxonomiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportTaxonomiesRequest. */ - interface IExportTaxonomiesRequest { - - /** ExportTaxonomiesRequest parent */ - parent?: (string|null); - - /** ExportTaxonomiesRequest taxonomies */ - taxonomies?: (string[]|null); - - /** ExportTaxonomiesRequest serializedTaxonomies */ - serializedTaxonomies?: (boolean|null); - } - - /** Represents an ExportTaxonomiesRequest. */ - class ExportTaxonomiesRequest implements IExportTaxonomiesRequest { - - /** - * Constructs a new ExportTaxonomiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IExportTaxonomiesRequest); - - /** ExportTaxonomiesRequest parent. */ - public parent: string; - - /** ExportTaxonomiesRequest taxonomies. */ - public taxonomies: string[]; - - /** ExportTaxonomiesRequest serializedTaxonomies. */ - public serializedTaxonomies?: (boolean|null); - - /** ExportTaxonomiesRequest destination. */ - public destination?: "serializedTaxonomies"; - - /** - * Creates a new ExportTaxonomiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportTaxonomiesRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IExportTaxonomiesRequest): google.cloud.datacatalog.v1.ExportTaxonomiesRequest; - - /** - * Encodes the specified ExportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ExportTaxonomiesRequest.verify|verify} messages. - * @param message ExportTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IExportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ExportTaxonomiesRequest.verify|verify} messages. - * @param message ExportTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IExportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ExportTaxonomiesRequest; - - /** - * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ExportTaxonomiesRequest; - - /** - * Verifies an ExportTaxonomiesRequest message. - * @param message Plain 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 ExportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportTaxonomiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ExportTaxonomiesRequest; - - /** - * Creates a plain object from an ExportTaxonomiesRequest message. Also converts values to other types if specified. - * @param message ExportTaxonomiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ExportTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportTaxonomiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportTaxonomiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportTaxonomiesResponse. */ - interface IExportTaxonomiesResponse { - - /** ExportTaxonomiesResponse taxonomies */ - taxonomies?: (google.cloud.datacatalog.v1.ISerializedTaxonomy[]|null); - } - - /** Represents an ExportTaxonomiesResponse. */ - class ExportTaxonomiesResponse implements IExportTaxonomiesResponse { - - /** - * Constructs a new ExportTaxonomiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1.IExportTaxonomiesResponse); - - /** ExportTaxonomiesResponse taxonomies. */ - public taxonomies: google.cloud.datacatalog.v1.ISerializedTaxonomy[]; - - /** - * Creates a new ExportTaxonomiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportTaxonomiesResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1.IExportTaxonomiesResponse): google.cloud.datacatalog.v1.ExportTaxonomiesResponse; - - /** - * Encodes the specified ExportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ExportTaxonomiesResponse.verify|verify} messages. - * @param message ExportTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1.IExportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ExportTaxonomiesResponse.verify|verify} messages. - * @param message ExportTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1.IExportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1.ExportTaxonomiesResponse; - - /** - * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1.ExportTaxonomiesResponse; - - /** - * Verifies an ExportTaxonomiesResponse message. - * @param message Plain 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 ExportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportTaxonomiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1.ExportTaxonomiesResponse; - - /** - * Creates a plain object from an ExportTaxonomiesResponse message. Also converts values to other types if specified. - * @param message ExportTaxonomiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1.ExportTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportTaxonomiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportTaxonomiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** IntegratedSystem enum. */ - enum IntegratedSystem { - INTEGRATED_SYSTEM_UNSPECIFIED = 0, - BIGQUERY = 1, - CLOUD_PUBSUB = 2 - } - - /** Represents a DataCatalog */ - class DataCatalog extends $protobuf.rpc.Service { - - /** - * Constructs a new DataCatalog 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 DataCatalog 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): DataCatalog; - - /** - * Calls SearchCatalog. - * @param request SearchCatalogRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchCatalogResponse - */ - public searchCatalog(request: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalogCallback): void; - - /** - * Calls SearchCatalog. - * @param request SearchCatalogRequest message or plain object - * @returns Promise - */ - public searchCatalog(request: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest): Promise; - - /** - * Calls CreateEntryGroup. - * @param request CreateEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryGroup - */ - public createEntryGroup(request: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroupCallback): void; - - /** - * Calls CreateEntryGroup. - * @param request CreateEntryGroupRequest message or plain object - * @returns Promise - */ - public createEntryGroup(request: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest): Promise; - - /** - * Calls UpdateEntryGroup. - * @param request UpdateEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryGroup - */ - public updateEntryGroup(request: google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroupCallback): void; - - /** - * Calls UpdateEntryGroup. - * @param request UpdateEntryGroupRequest message or plain object - * @returns Promise - */ - public updateEntryGroup(request: google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest): Promise; - - /** - * Calls GetEntryGroup. - * @param request GetEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EntryGroup - */ - public getEntryGroup(request: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroupCallback): void; - - /** - * Calls GetEntryGroup. - * @param request GetEntryGroupRequest message or plain object - * @returns Promise - */ - public getEntryGroup(request: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest): Promise; - - /** - * Calls DeleteEntryGroup. - * @param request DeleteEntryGroupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteEntryGroup(request: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroupCallback): void; - - /** - * Calls DeleteEntryGroup. - * @param request DeleteEntryGroupRequest message or plain object - * @returns Promise - */ - public deleteEntryGroup(request: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest): Promise; - - /** - * Calls ListEntryGroups. - * @param request ListEntryGroupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntryGroupsResponse - */ - public listEntryGroups(request: google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroupsCallback): void; - - /** - * Calls ListEntryGroups. - * @param request ListEntryGroupsRequest message or plain object - * @returns Promise - */ - public listEntryGroups(request: google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest): Promise; - - /** - * Calls CreateEntry. - * @param request CreateEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry - */ - public createEntry(request: google.cloud.datacatalog.v1beta1.ICreateEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryCallback): void; - - /** - * Calls CreateEntry. - * @param request CreateEntryRequest message or plain object - * @returns Promise - */ - public createEntry(request: google.cloud.datacatalog.v1beta1.ICreateEntryRequest): Promise; - - /** - * Calls UpdateEntry. - * @param request UpdateEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry - */ - public updateEntry(request: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryCallback): void; - - /** - * Calls UpdateEntry. - * @param request UpdateEntryRequest message or plain object - * @returns Promise - */ - public updateEntry(request: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest): Promise; - - /** - * Calls DeleteEntry. - * @param request DeleteEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteEntry(request: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryCallback): void; - - /** - * Calls DeleteEntry. - * @param request DeleteEntryRequest message or plain object - * @returns Promise - */ - public deleteEntry(request: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest): Promise; - - /** - * Calls GetEntry. - * @param request GetEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry - */ - public getEntry(request: google.cloud.datacatalog.v1beta1.IGetEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryCallback): void; - - /** - * Calls GetEntry. - * @param request GetEntryRequest message or plain object - * @returns Promise - */ - public getEntry(request: google.cloud.datacatalog.v1beta1.IGetEntryRequest): Promise; - - /** - * Calls LookupEntry. - * @param request LookupEntryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entry - */ - public lookupEntry(request: google.cloud.datacatalog.v1beta1.ILookupEntryRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntryCallback): void; - - /** - * Calls LookupEntry. - * @param request LookupEntryRequest message or plain object - * @returns Promise - */ - public lookupEntry(request: google.cloud.datacatalog.v1beta1.ILookupEntryRequest): Promise; - - /** - * Calls ListEntries. - * @param request ListEntriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntriesResponse - */ - public listEntries(request: google.cloud.datacatalog.v1beta1.IListEntriesRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.ListEntriesCallback): void; - - /** - * Calls ListEntries. - * @param request ListEntriesRequest message or plain object - * @returns Promise - */ - public listEntries(request: google.cloud.datacatalog.v1beta1.IListEntriesRequest): Promise; - - /** - * Calls CreateTagTemplate. - * @param request CreateTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplate - */ - public createTagTemplate(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateCallback): void; - - /** - * Calls CreateTagTemplate. - * @param request CreateTagTemplateRequest message or plain object - * @returns Promise - */ - public createTagTemplate(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest): Promise; - - /** - * Calls GetTagTemplate. - * @param request GetTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplate - */ - public getTagTemplate(request: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplateCallback): void; - - /** - * Calls GetTagTemplate. - * @param request GetTagTemplateRequest message or plain object - * @returns Promise - */ - public getTagTemplate(request: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest): Promise; - - /** - * Calls UpdateTagTemplate. - * @param request UpdateTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplate - */ - public updateTagTemplate(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateCallback): void; - - /** - * Calls UpdateTagTemplate. - * @param request UpdateTagTemplateRequest message or plain object - * @returns Promise - */ - public updateTagTemplate(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest): Promise; - - /** - * Calls DeleteTagTemplate. - * @param request DeleteTagTemplateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTagTemplate(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateCallback): void; - - /** - * Calls DeleteTagTemplate. - * @param request DeleteTagTemplateRequest message or plain object - * @returns Promise - */ - public deleteTagTemplate(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest): Promise; - - /** - * Calls CreateTagTemplateField. - * @param request CreateTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField - */ - public createTagTemplateField(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateFieldCallback): void; - - /** - * Calls CreateTagTemplateField. - * @param request CreateTagTemplateFieldRequest message or plain object - * @returns Promise - */ - public createTagTemplateField(request: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest): Promise; - - /** - * Calls UpdateTagTemplateField. - * @param request UpdateTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField - */ - public updateTagTemplateField(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateFieldCallback): void; - - /** - * Calls UpdateTagTemplateField. - * @param request UpdateTagTemplateFieldRequest message or plain object - * @returns Promise - */ - public updateTagTemplateField(request: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest): Promise; - - /** - * Calls RenameTagTemplateField. - * @param request RenameTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TagTemplateField - */ - public renameTagTemplateField(request: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldCallback): void; - - /** - * Calls RenameTagTemplateField. - * @param request RenameTagTemplateFieldRequest message or plain object - * @returns Promise - */ - public renameTagTemplateField(request: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest): Promise; - - /** - * Calls DeleteTagTemplateField. - * @param request DeleteTagTemplateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTagTemplateField(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateFieldCallback): void; - - /** - * Calls DeleteTagTemplateField. - * @param request DeleteTagTemplateFieldRequest message or plain object - * @returns Promise - */ - public deleteTagTemplateField(request: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest): Promise; - - /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag - */ - public createTag(request: google.cloud.datacatalog.v1beta1.ICreateTagRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagCallback): void; - - /** - * Calls CreateTag. - * @param request CreateTagRequest message or plain object - * @returns Promise - */ - public createTag(request: google.cloud.datacatalog.v1beta1.ICreateTagRequest): Promise; - - /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Tag - */ - public updateTag(request: google.cloud.datacatalog.v1beta1.IUpdateTagRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagCallback): void; - - /** - * Calls UpdateTag. - * @param request UpdateTagRequest message or plain object - * @returns Promise - */ - public updateTag(request: google.cloud.datacatalog.v1beta1.IUpdateTagRequest): Promise; - - /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTag(request: google.cloud.datacatalog.v1beta1.IDeleteTagRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagCallback): void; - - /** - * Calls DeleteTag. - * @param request DeleteTagRequest message or plain object - * @returns Promise - */ - public deleteTag(request: google.cloud.datacatalog.v1beta1.IDeleteTagRequest): Promise; - - /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTagsResponse - */ - public listTags(request: google.cloud.datacatalog.v1beta1.IListTagsRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.ListTagsCallback): void; - - /** - * Calls ListTags. - * @param request ListTagsRequest message or plain object - * @returns Promise - */ - public listTags(request: google.cloud.datacatalog.v1beta1.IListTagsRequest): Promise; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicyCallback): void; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicyCallback): void; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace DataCatalog { - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|searchCatalog}. - * @param error Error, if any - * @param [response] SearchCatalogResponse - */ - type SearchCatalogCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.SearchCatalogResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createEntryGroup}. - * @param error Error, if any - * @param [response] EntryGroup - */ - type CreateEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.EntryGroup) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateEntryGroup}. - * @param error Error, if any - * @param [response] EntryGroup - */ - type UpdateEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.EntryGroup) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|getEntryGroup}. - * @param error Error, if any - * @param [response] EntryGroup - */ - type GetEntryGroupCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.EntryGroup) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteEntryGroup}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteEntryGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|listEntryGroups}. - * @param error Error, if any - * @param [response] ListEntryGroupsResponse - */ - type ListEntryGroupsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type CreateEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type UpdateEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteEntry}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteEntryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|getEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type GetEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|lookupEntry}. - * @param error Error, if any - * @param [response] Entry - */ - type LookupEntryCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Entry) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|listEntries}. - * @param error Error, if any - * @param [response] ListEntriesResponse - */ - type ListEntriesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ListEntriesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createTagTemplate}. - * @param error Error, if any - * @param [response] TagTemplate - */ - type CreateTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplate) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|getTagTemplate}. - * @param error Error, if any - * @param [response] TagTemplate - */ - type GetTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplate) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateTagTemplate}. - * @param error Error, if any - * @param [response] TagTemplate - */ - type UpdateTagTemplateCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplate) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteTagTemplate}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTagTemplateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createTagTemplateField}. - * @param error Error, if any - * @param [response] TagTemplateField - */ - type CreateTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplateField) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateTagTemplateField}. - * @param error Error, if any - * @param [response] TagTemplateField - */ - type UpdateTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplateField) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|renameTagTemplateField}. - * @param error Error, if any - * @param [response] TagTemplateField - */ - type RenameTagTemplateFieldCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.TagTemplateField) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteTagTemplateField}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTagTemplateFieldCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createTag}. - * @param error Error, if any - * @param [response] Tag - */ - type CreateTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Tag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateTag}. - * @param error Error, if any - * @param [response] Tag - */ - type UpdateTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Tag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteTag}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|listTags}. - * @param error Error, if any - * @param [response] ListTagsResponse - */ - type ListTagsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ListTagsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a SearchCatalogRequest. */ - interface ISearchCatalogRequest { - - /** SearchCatalogRequest scope */ - scope?: (google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null); - - /** SearchCatalogRequest query */ - query?: (string|null); - - /** SearchCatalogRequest pageSize */ - pageSize?: (number|null); - - /** SearchCatalogRequest pageToken */ - pageToken?: (string|null); - - /** SearchCatalogRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a SearchCatalogRequest. */ - class SearchCatalogRequest implements ISearchCatalogRequest { - - /** - * Constructs a new SearchCatalogRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest); - - /** SearchCatalogRequest scope. */ - public scope?: (google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null); - - /** SearchCatalogRequest query. */ - public query: string; - - /** SearchCatalogRequest pageSize. */ - public pageSize: number; - - /** SearchCatalogRequest pageToken. */ - public pageToken: string; - - /** SearchCatalogRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new SearchCatalogRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchCatalogRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; - - /** - * Encodes the specified SearchCatalogRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. - * @param message SearchCatalogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchCatalogRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. - * @param message SearchCatalogRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; - - /** - * Verifies a SearchCatalogRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchCatalogRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchCatalogRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogRequest; - - /** - * Creates a plain object from a SearchCatalogRequest message. Also converts values to other types if specified. - * @param message SearchCatalogRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchCatalogRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchCatalogRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SearchCatalogRequest { - - /** Properties of a Scope. */ - interface IScope { - - /** Scope includeOrgIds */ - includeOrgIds?: (string[]|null); - - /** Scope includeProjectIds */ - includeProjectIds?: (string[]|null); - - /** Scope includeGcpPublicDatasets */ - includeGcpPublicDatasets?: (boolean|null); - } - - /** Represents a Scope. */ - class Scope implements IScope { - - /** - * Constructs a new Scope. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope); - - /** Scope includeOrgIds. */ - public includeOrgIds: string[]; - - /** Scope includeProjectIds. */ - public includeProjectIds: string[]; - - /** Scope includeGcpPublicDatasets. */ - public includeGcpPublicDatasets: boolean; - - /** - * Creates a new Scope instance using the specified properties. - * @param [properties] Properties to set - * @returns Scope instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; - - /** - * Encodes the specified Scope message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. - * @param message Scope message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. - * @param message Scope message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Scope message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; - - /** - * Decodes a Scope message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; - - /** - * Verifies a Scope message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Scope message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Scope - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope; - - /** - * Creates a plain object from a Scope message. Also converts values to other types if specified. - * @param message Scope - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Scope to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Scope - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SearchCatalogResponse. */ - interface ISearchCatalogResponse { - - /** SearchCatalogResponse results */ - results?: (google.cloud.datacatalog.v1beta1.ISearchCatalogResult[]|null); - - /** SearchCatalogResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a SearchCatalogResponse. */ - class SearchCatalogResponse implements ISearchCatalogResponse { - - /** - * Constructs a new SearchCatalogResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse); - - /** SearchCatalogResponse results. */ - public results: google.cloud.datacatalog.v1beta1.ISearchCatalogResult[]; - - /** SearchCatalogResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new SearchCatalogResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchCatalogResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; - - /** - * Encodes the specified SearchCatalogResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. - * @param message SearchCatalogResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchCatalogResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. - * @param message SearchCatalogResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchCatalogResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; - - /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchCatalogResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; - - /** - * Verifies a SearchCatalogResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchCatalogResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchCatalogResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogResponse; - - /** - * Creates a plain object from a SearchCatalogResponse message. Also converts values to other types if specified. - * @param message SearchCatalogResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchCatalogResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchCatalogResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateEntryGroupRequest. */ - interface ICreateEntryGroupRequest { - - /** CreateEntryGroupRequest parent */ - parent?: (string|null); - - /** CreateEntryGroupRequest entryGroupId */ - entryGroupId?: (string|null); - - /** CreateEntryGroupRequest entryGroup */ - entryGroup?: (google.cloud.datacatalog.v1beta1.IEntryGroup|null); - } - - /** Represents a CreateEntryGroupRequest. */ - class CreateEntryGroupRequest implements ICreateEntryGroupRequest { - - /** - * Constructs a new CreateEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest); - - /** CreateEntryGroupRequest parent. */ - public parent: string; - - /** CreateEntryGroupRequest entryGroupId. */ - public entryGroupId: string; - - /** CreateEntryGroupRequest entryGroup. */ - public entryGroup?: (google.cloud.datacatalog.v1beta1.IEntryGroup|null); - - /** - * Creates a new CreateEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEntryGroupRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; - - /** - * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. - * @param message CreateEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. - * @param message CreateEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; - - /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; - - /** - * Verifies a CreateEntryGroupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEntryGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest; - - /** - * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. - * @param message CreateEntryGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEntryGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEntryGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEntryGroupRequest. */ - interface IUpdateEntryGroupRequest { - - /** UpdateEntryGroupRequest entryGroup */ - entryGroup?: (google.cloud.datacatalog.v1beta1.IEntryGroup|null); - - /** UpdateEntryGroupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateEntryGroupRequest. */ - class UpdateEntryGroupRequest implements IUpdateEntryGroupRequest { - - /** - * Constructs a new UpdateEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest); - - /** UpdateEntryGroupRequest entryGroup. */ - public entryGroup?: (google.cloud.datacatalog.v1beta1.IEntryGroup|null); - - /** UpdateEntryGroupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntryGroupRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest): google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest; - - /** - * Encodes the specified UpdateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest.verify|verify} messages. - * @param message UpdateEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest.verify|verify} messages. - * @param message UpdateEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEntryGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest; - - /** - * Decodes an UpdateEntryGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest; - - /** - * Verifies an UpdateEntryGroupRequest message. - * @param message Plain 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 UpdateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEntryGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest; - - /** - * Creates a plain object from an UpdateEntryGroupRequest message. Also converts values to other types if specified. - * @param message UpdateEntryGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEntryGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEntryGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEntryGroupRequest. */ - interface IGetEntryGroupRequest { - - /** GetEntryGroupRequest name */ - name?: (string|null); - - /** GetEntryGroupRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a GetEntryGroupRequest. */ - class GetEntryGroupRequest implements IGetEntryGroupRequest { - - /** - * Constructs a new GetEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest); - - /** GetEntryGroupRequest name. */ - public name: string; - - /** GetEntryGroupRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new GetEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEntryGroupRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; - - /** - * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. - * @param message GetEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. - * @param message GetEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; - - /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; - - /** - * Verifies a GetEntryGroupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEntryGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetEntryGroupRequest; - - /** - * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. - * @param message GetEntryGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GetEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEntryGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEntryGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEntryGroupRequest. */ - interface IDeleteEntryGroupRequest { - - /** DeleteEntryGroupRequest name */ - name?: (string|null); - - /** DeleteEntryGroupRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteEntryGroupRequest. */ - class DeleteEntryGroupRequest implements IDeleteEntryGroupRequest { - - /** - * Constructs a new DeleteEntryGroupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest); - - /** DeleteEntryGroupRequest name. */ - public name: string; - - /** DeleteEntryGroupRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteEntryGroupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEntryGroupRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; - - /** - * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. - * @param message DeleteEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. - * @param message DeleteEntryGroupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; - - /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; - - /** - * Verifies a DeleteEntryGroupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEntryGroupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest; - - /** - * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. - * @param message DeleteEntryGroupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEntryGroupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEntryGroupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntryGroupsRequest. */ - interface IListEntryGroupsRequest { - - /** ListEntryGroupsRequest parent */ - parent?: (string|null); - - /** ListEntryGroupsRequest pageSize */ - pageSize?: (number|null); - - /** ListEntryGroupsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListEntryGroupsRequest. */ - class ListEntryGroupsRequest implements IListEntryGroupsRequest { - - /** - * Constructs a new ListEntryGroupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest); - - /** ListEntryGroupsRequest parent. */ - public parent: string; - - /** ListEntryGroupsRequest pageSize. */ - public pageSize: number; - - /** ListEntryGroupsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListEntryGroupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntryGroupsRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest): google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest; - - /** - * Encodes the specified ListEntryGroupsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest.verify|verify} messages. - * @param message ListEntryGroupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntryGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest.verify|verify} messages. - * @param message ListEntryGroupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntryGroupsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntryGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest; - - /** - * Decodes a ListEntryGroupsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntryGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest; - - /** - * Verifies a ListEntryGroupsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntryGroupsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntryGroupsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest; - - /** - * Creates a plain object from a ListEntryGroupsRequest message. Also converts values to other types if specified. - * @param message ListEntryGroupsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntryGroupsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntryGroupsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntryGroupsResponse. */ - interface IListEntryGroupsResponse { - - /** ListEntryGroupsResponse entryGroups */ - entryGroups?: (google.cloud.datacatalog.v1beta1.IEntryGroup[]|null); - - /** ListEntryGroupsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEntryGroupsResponse. */ - class ListEntryGroupsResponse implements IListEntryGroupsResponse { - - /** - * Constructs a new ListEntryGroupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse); - - /** ListEntryGroupsResponse entryGroups. */ - public entryGroups: google.cloud.datacatalog.v1beta1.IEntryGroup[]; - - /** ListEntryGroupsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEntryGroupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntryGroupsResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse): google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse; - - /** - * Encodes the specified ListEntryGroupsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse.verify|verify} messages. - * @param message ListEntryGroupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntryGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse.verify|verify} messages. - * @param message ListEntryGroupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntryGroupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntryGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse; - - /** - * Decodes a ListEntryGroupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntryGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse; - - /** - * Verifies a ListEntryGroupsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntryGroupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntryGroupsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse; - - /** - * Creates a plain object from a ListEntryGroupsResponse message. Also converts values to other types if specified. - * @param message ListEntryGroupsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntryGroupsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntryGroupsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateEntryRequest. */ - interface ICreateEntryRequest { - - /** CreateEntryRequest parent */ - parent?: (string|null); - - /** CreateEntryRequest entryId */ - entryId?: (string|null); - - /** CreateEntryRequest entry */ - entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); - } - - /** Represents a CreateEntryRequest. */ - class CreateEntryRequest implements ICreateEntryRequest { - - /** - * Constructs a new CreateEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryRequest); - - /** CreateEntryRequest parent. */ - public parent: string; - - /** CreateEntryRequest entryId. */ - public entryId: string; - - /** CreateEntryRequest entry. */ - public entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); - - /** - * Creates a new CreateEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateEntryRequest): google.cloud.datacatalog.v1beta1.CreateEntryRequest; - - /** - * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. - * @param message CreateEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. - * @param message CreateEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateEntryRequest; - - /** - * Decodes a CreateEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateEntryRequest; - - /** - * Verifies a CreateEntryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateEntryRequest; - - /** - * Creates a plain object from a CreateEntryRequest message. Also converts values to other types if specified. - * @param message CreateEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEntryRequest. */ - interface IUpdateEntryRequest { - - /** UpdateEntryRequest entry */ - entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); - - /** UpdateEntryRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateEntryRequest. */ - class UpdateEntryRequest implements IUpdateEntryRequest { - - /** - * Constructs a new UpdateEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest); - - /** UpdateEntryRequest entry. */ - public entry?: (google.cloud.datacatalog.v1beta1.IEntry|null); - - /** UpdateEntryRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; - - /** - * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. - * @param message UpdateEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. - * @param message UpdateEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; - - /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; - - /** - * Verifies an UpdateEntryRequest message. - * @param message Plain 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 UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateEntryRequest; - - /** - * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. - * @param message UpdateEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEntryRequest. */ - interface IDeleteEntryRequest { - - /** DeleteEntryRequest name */ - name?: (string|null); - } - - /** Represents a DeleteEntryRequest. */ - class DeleteEntryRequest implements IDeleteEntryRequest { - - /** - * Constructs a new DeleteEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest); - - /** DeleteEntryRequest name. */ - public name: string; - - /** - * Creates a new DeleteEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; - - /** - * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. - * @param message DeleteEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. - * @param message DeleteEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; - - /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; - - /** - * Verifies a DeleteEntryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteEntryRequest; - - /** - * Creates a plain object from a DeleteEntryRequest message. Also converts values to other types if specified. - * @param message DeleteEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEntryRequest. */ - interface IGetEntryRequest { - - /** GetEntryRequest name */ - name?: (string|null); - } - - /** Represents a GetEntryRequest. */ - class GetEntryRequest implements IGetEntryRequest { - - /** - * Constructs a new GetEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGetEntryRequest); - - /** GetEntryRequest name. */ - public name: string; - - /** - * Creates a new GetEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGetEntryRequest): google.cloud.datacatalog.v1beta1.GetEntryRequest; - - /** - * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. - * @param message GetEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. - * @param message GetEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetEntryRequest; - - /** - * Decodes a GetEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetEntryRequest; - - /** - * Verifies a GetEntryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetEntryRequest; - - /** - * Creates a plain object from a GetEntryRequest message. Also converts values to other types if specified. - * @param message GetEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GetEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LookupEntryRequest. */ - interface ILookupEntryRequest { - - /** LookupEntryRequest linkedResource */ - linkedResource?: (string|null); - - /** LookupEntryRequest sqlResource */ - sqlResource?: (string|null); - } - - /** Represents a LookupEntryRequest. */ - class LookupEntryRequest implements ILookupEntryRequest { - - /** - * Constructs a new LookupEntryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ILookupEntryRequest); - - /** LookupEntryRequest linkedResource. */ - public linkedResource?: (string|null); - - /** LookupEntryRequest sqlResource. */ - public sqlResource?: (string|null); - - /** LookupEntryRequest targetName. */ - public targetName?: ("linkedResource"|"sqlResource"); - - /** - * Creates a new LookupEntryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LookupEntryRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ILookupEntryRequest): google.cloud.datacatalog.v1beta1.LookupEntryRequest; - - /** - * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. - * @param message LookupEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. - * @param message LookupEntryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ILookupEntryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LookupEntryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LookupEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.LookupEntryRequest; - - /** - * Decodes a LookupEntryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LookupEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.LookupEntryRequest; - - /** - * Verifies a LookupEntryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LookupEntryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LookupEntryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.LookupEntryRequest; - - /** - * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. - * @param message LookupEntryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.LookupEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LookupEntryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LookupEntryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Entry. */ - interface IEntry { - - /** Entry name */ - name?: (string|null); - - /** Entry linkedResource */ - linkedResource?: (string|null); - - /** Entry type */ - type?: (google.cloud.datacatalog.v1beta1.EntryType|keyof typeof google.cloud.datacatalog.v1beta1.EntryType|null); - - /** Entry userSpecifiedType */ - userSpecifiedType?: (string|null); - - /** Entry integratedSystem */ - integratedSystem?: (google.cloud.datacatalog.v1beta1.IntegratedSystem|keyof typeof google.cloud.datacatalog.v1beta1.IntegratedSystem|null); - - /** Entry userSpecifiedSystem */ - userSpecifiedSystem?: (string|null); - - /** Entry gcsFilesetSpec */ - gcsFilesetSpec?: (google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null); - - /** Entry bigqueryTableSpec */ - bigqueryTableSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null); - - /** Entry bigqueryDateShardedSpec */ - bigqueryDateShardedSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null); - - /** Entry displayName */ - displayName?: (string|null); - - /** Entry description */ - description?: (string|null); - - /** Entry schema */ - schema?: (google.cloud.datacatalog.v1beta1.ISchema|null); - - /** Entry sourceSystemTimestamps */ - sourceSystemTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); - } - - /** Represents an Entry. */ - class Entry implements IEntry { - - /** - * Constructs a new Entry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IEntry); - - /** Entry name. */ - public name: string; - - /** Entry linkedResource. */ - public linkedResource: string; - - /** Entry type. */ - public type?: (google.cloud.datacatalog.v1beta1.EntryType|keyof typeof google.cloud.datacatalog.v1beta1.EntryType|null); - - /** Entry userSpecifiedType. */ - public userSpecifiedType?: (string|null); - - /** Entry integratedSystem. */ - public integratedSystem?: (google.cloud.datacatalog.v1beta1.IntegratedSystem|keyof typeof google.cloud.datacatalog.v1beta1.IntegratedSystem|null); - - /** Entry userSpecifiedSystem. */ - public userSpecifiedSystem?: (string|null); - - /** Entry gcsFilesetSpec. */ - public gcsFilesetSpec?: (google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null); - - /** Entry bigqueryTableSpec. */ - public bigqueryTableSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null); - - /** Entry bigqueryDateShardedSpec. */ - public bigqueryDateShardedSpec?: (google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null); - - /** Entry displayName. */ - public displayName: string; - - /** Entry description. */ - public description: string; - - /** Entry schema. */ - public schema?: (google.cloud.datacatalog.v1beta1.ISchema|null); - - /** Entry sourceSystemTimestamps. */ - public sourceSystemTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); - - /** Entry entryType. */ - public entryType?: ("type"|"userSpecifiedType"); - - /** Entry system. */ - public system?: ("integratedSystem"|"userSpecifiedSystem"); - - /** Entry typeSpec. */ - public typeSpec?: ("gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"); - - /** - * Creates a new Entry instance using the specified properties. - * @param [properties] Properties to set - * @returns Entry instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IEntry): google.cloud.datacatalog.v1beta1.Entry; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Entry; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Entry; - - /** - * Verifies an Entry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Entry; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @param message Entry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Entry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EntryGroup. */ - interface IEntryGroup { - - /** EntryGroup name */ - name?: (string|null); - - /** EntryGroup displayName */ - displayName?: (string|null); - - /** EntryGroup description */ - description?: (string|null); - - /** EntryGroup dataCatalogTimestamps */ - dataCatalogTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); - } - - /** Represents an EntryGroup. */ - class EntryGroup implements IEntryGroup { - - /** - * Constructs a new EntryGroup. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IEntryGroup); - - /** EntryGroup name. */ - public name: string; - - /** EntryGroup displayName. */ - public displayName: string; - - /** EntryGroup description. */ - public description: string; - - /** EntryGroup dataCatalogTimestamps. */ - public dataCatalogTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); - - /** - * Creates a new EntryGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns EntryGroup instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IEntryGroup): google.cloud.datacatalog.v1beta1.EntryGroup; - - /** - * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. - * @param message EntryGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. - * @param message EntryGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IEntryGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EntryGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.EntryGroup; - - /** - * Decodes an EntryGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.EntryGroup; - - /** - * Verifies an EntryGroup message. - * @param message Plain 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 EntryGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntryGroup - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.EntryGroup; - - /** - * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. - * @param message EntryGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.EntryGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EntryGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EntryGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTagTemplateRequest. */ - interface ICreateTagTemplateRequest { - - /** CreateTagTemplateRequest parent */ - parent?: (string|null); - - /** CreateTagTemplateRequest tagTemplateId */ - tagTemplateId?: (string|null); - - /** CreateTagTemplateRequest tagTemplate */ - tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); - } - - /** Represents a CreateTagTemplateRequest. */ - class CreateTagTemplateRequest implements ICreateTagTemplateRequest { - - /** - * Constructs a new CreateTagTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest); - - /** CreateTagTemplateRequest parent. */ - public parent: string; - - /** CreateTagTemplateRequest tagTemplateId. */ - public tagTemplateId: string; - - /** CreateTagTemplateRequest tagTemplate. */ - public tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); - - /** - * Creates a new CreateTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagTemplateRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; - - /** - * Encodes the specified CreateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. - * @param message CreateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. - * @param message CreateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; - - /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; - - /** - * Verifies a CreateTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest; - - /** - * Creates a plain object from a CreateTagTemplateRequest message. Also converts values to other types if specified. - * @param message CreateTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTagTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTagTemplateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTagTemplateRequest. */ - interface IGetTagTemplateRequest { - - /** GetTagTemplateRequest name */ - name?: (string|null); - } - - /** Represents a GetTagTemplateRequest. */ - class GetTagTemplateRequest implements IGetTagTemplateRequest { - - /** - * Constructs a new GetTagTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest); - - /** GetTagTemplateRequest name. */ - public name: string; - - /** - * Creates a new GetTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTagTemplateRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; - - /** - * Encodes the specified GetTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. - * @param message GetTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. - * @param message GetTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; - - /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; - - /** - * Verifies a GetTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTagTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetTagTemplateRequest; - - /** - * Creates a plain object from a GetTagTemplateRequest message. Also converts values to other types if specified. - * @param message GetTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GetTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTagTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetTagTemplateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTagTemplateRequest. */ - interface IUpdateTagTemplateRequest { - - /** UpdateTagTemplateRequest tagTemplate */ - tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); - - /** UpdateTagTemplateRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTagTemplateRequest. */ - class UpdateTagTemplateRequest implements IUpdateTagTemplateRequest { - - /** - * Constructs a new UpdateTagTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest); - - /** UpdateTagTemplateRequest tagTemplate. */ - public tagTemplate?: (google.cloud.datacatalog.v1beta1.ITagTemplate|null); - - /** UpdateTagTemplateRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTagTemplateRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; - - /** - * Encodes the specified UpdateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. - * @param message UpdateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. - * @param message UpdateTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; - - /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; - - /** - * Verifies an UpdateTagTemplateRequest message. - * @param message Plain 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 UpdateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTagTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest; - - /** - * Creates a plain object from an UpdateTagTemplateRequest message. Also converts values to other types if specified. - * @param message UpdateTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTagTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTagTemplateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTagTemplateRequest. */ - interface IDeleteTagTemplateRequest { - - /** DeleteTagTemplateRequest name */ - name?: (string|null); - - /** DeleteTagTemplateRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteTagTemplateRequest. */ - class DeleteTagTemplateRequest implements IDeleteTagTemplateRequest { - - /** - * Constructs a new DeleteTagTemplateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest); - - /** DeleteTagTemplateRequest name. */ - public name: string; - - /** DeleteTagTemplateRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteTagTemplateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTagTemplateRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; - - /** - * Encodes the specified DeleteTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. - * @param message DeleteTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. - * @param message DeleteTagTemplateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; - - /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; - - /** - * Verifies a DeleteTagTemplateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTagTemplateRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest; - - /** - * Creates a plain object from a DeleteTagTemplateRequest message. Also converts values to other types if specified. - * @param message DeleteTagTemplateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTagTemplateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTagTemplateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTagRequest. */ - interface ICreateTagRequest { - - /** CreateTagRequest parent */ - parent?: (string|null); - - /** CreateTagRequest tag */ - tag?: (google.cloud.datacatalog.v1beta1.ITag|null); - } - - /** Represents a CreateTagRequest. */ - class CreateTagRequest implements ICreateTagRequest { - - /** - * Constructs a new CreateTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTagRequest); - - /** CreateTagRequest parent. */ - public parent: string; - - /** CreateTagRequest tag. */ - public tag?: (google.cloud.datacatalog.v1beta1.ITag|null); - - /** - * Creates a new CreateTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTagRequest): google.cloud.datacatalog.v1beta1.CreateTagRequest; - - /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. - * @param message CreateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTagRequest; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTagRequest; - - /** - * Verifies a CreateTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTagRequest; - - /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. - * @param message CreateTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTagRequest. */ - interface IUpdateTagRequest { - - /** UpdateTagRequest tag */ - tag?: (google.cloud.datacatalog.v1beta1.ITag|null); - - /** UpdateTagRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTagRequest. */ - class UpdateTagRequest implements IUpdateTagRequest { - - /** - * Constructs a new UpdateTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagRequest); - - /** UpdateTagRequest tag. */ - public tag?: (google.cloud.datacatalog.v1beta1.ITag|null); - - /** UpdateTagRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagRequest): google.cloud.datacatalog.v1beta1.UpdateTagRequest; - - /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. - * @param message UpdateTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTagRequest; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTagRequest; - - /** - * Verifies an UpdateTagRequest message. - * @param message Plain 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 UpdateTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTagRequest; - - /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. - * @param message UpdateTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTagRequest. */ - interface IDeleteTagRequest { - - /** DeleteTagRequest name */ - name?: (string|null); - } - - /** Represents a DeleteTagRequest. */ - class DeleteTagRequest implements IDeleteTagRequest { - - /** - * Constructs a new DeleteTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagRequest); - - /** DeleteTagRequest name. */ - public name: string; - - /** - * Creates a new DeleteTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagRequest): google.cloud.datacatalog.v1beta1.DeleteTagRequest; - - /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. - * @param message DeleteTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTagRequest; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTagRequest; - - /** - * Verifies a DeleteTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTagRequest; - - /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. - * @param message DeleteTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTagTemplateFieldRequest. */ - interface ICreateTagTemplateFieldRequest { - - /** CreateTagTemplateFieldRequest parent */ - parent?: (string|null); - - /** CreateTagTemplateFieldRequest tagTemplateFieldId */ - tagTemplateFieldId?: (string|null); - - /** CreateTagTemplateFieldRequest tagTemplateField */ - tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); - } - - /** Represents a CreateTagTemplateFieldRequest. */ - class CreateTagTemplateFieldRequest implements ICreateTagTemplateFieldRequest { - - /** - * Constructs a new CreateTagTemplateFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest); - - /** CreateTagTemplateFieldRequest parent. */ - public parent: string; - - /** CreateTagTemplateFieldRequest tagTemplateFieldId. */ - public tagTemplateFieldId: string; - - /** CreateTagTemplateFieldRequest tagTemplateField. */ - public tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); - - /** - * Creates a new CreateTagTemplateFieldRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTagTemplateFieldRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; - - /** - * Encodes the specified CreateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @param message CreateTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @param message CreateTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; - - /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; - - /** - * Verifies a CreateTagTemplateFieldRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTagTemplateFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest; - - /** - * Creates a plain object from a CreateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message CreateTagTemplateFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTagTemplateFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTagTemplateFieldRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTagTemplateFieldRequest. */ - interface IUpdateTagTemplateFieldRequest { - - /** UpdateTagTemplateFieldRequest name */ - name?: (string|null); - - /** UpdateTagTemplateFieldRequest tagTemplateField */ - tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); - - /** UpdateTagTemplateFieldRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTagTemplateFieldRequest. */ - class UpdateTagTemplateFieldRequest implements IUpdateTagTemplateFieldRequest { - - /** - * Constructs a new UpdateTagTemplateFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest); - - /** UpdateTagTemplateFieldRequest name. */ - public name: string; - - /** UpdateTagTemplateFieldRequest tagTemplateField. */ - public tagTemplateField?: (google.cloud.datacatalog.v1beta1.ITagTemplateField|null); - - /** UpdateTagTemplateFieldRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTagTemplateFieldRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTagTemplateFieldRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; - - /** - * Encodes the specified UpdateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @param message UpdateTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @param message UpdateTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; - - /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; - - /** - * Verifies an UpdateTagTemplateFieldRequest message. - * @param message Plain 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 UpdateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTagTemplateFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest; - - /** - * Creates a plain object from an UpdateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message UpdateTagTemplateFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTagTemplateFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTagTemplateFieldRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RenameTagTemplateFieldRequest. */ - interface IRenameTagTemplateFieldRequest { - - /** RenameTagTemplateFieldRequest name */ - name?: (string|null); - - /** RenameTagTemplateFieldRequest newTagTemplateFieldId */ - newTagTemplateFieldId?: (string|null); - } - - /** Represents a RenameTagTemplateFieldRequest. */ - class RenameTagTemplateFieldRequest implements IRenameTagTemplateFieldRequest { - - /** - * Constructs a new RenameTagTemplateFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest); - - /** RenameTagTemplateFieldRequest name. */ - public name: string; - - /** RenameTagTemplateFieldRequest newTagTemplateFieldId. */ - public newTagTemplateFieldId: string; - - /** - * Creates a new RenameTagTemplateFieldRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RenameTagTemplateFieldRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; - - /** - * Encodes the specified RenameTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @param message RenameTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RenameTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @param message RenameTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; - - /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; - - /** - * Verifies a RenameTagTemplateFieldRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RenameTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RenameTagTemplateFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest; - - /** - * Creates a plain object from a RenameTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message RenameTagTemplateFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RenameTagTemplateFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RenameTagTemplateFieldRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTagTemplateFieldRequest. */ - interface IDeleteTagTemplateFieldRequest { - - /** DeleteTagTemplateFieldRequest name */ - name?: (string|null); - - /** DeleteTagTemplateFieldRequest force */ - force?: (boolean|null); - } - - /** Represents a DeleteTagTemplateFieldRequest. */ - class DeleteTagTemplateFieldRequest implements IDeleteTagTemplateFieldRequest { - - /** - * Constructs a new DeleteTagTemplateFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest); - - /** DeleteTagTemplateFieldRequest name. */ - public name: string; - - /** DeleteTagTemplateFieldRequest force. */ - public force: boolean; - - /** - * Creates a new DeleteTagTemplateFieldRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTagTemplateFieldRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; - - /** - * Encodes the specified DeleteTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @param message DeleteTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @param message DeleteTagTemplateFieldRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; - - /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; - - /** - * Verifies a DeleteTagTemplateFieldRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTagTemplateFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest; - - /** - * Creates a plain object from a DeleteTagTemplateFieldRequest message. Also converts values to other types if specified. - * @param message DeleteTagTemplateFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTagTemplateFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTagTemplateFieldRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTagsRequest. */ - interface IListTagsRequest { - - /** ListTagsRequest parent */ - parent?: (string|null); - - /** ListTagsRequest pageSize */ - pageSize?: (number|null); - - /** ListTagsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListTagsRequest. */ - class ListTagsRequest implements IListTagsRequest { - - /** - * Constructs a new ListTagsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListTagsRequest); - - /** ListTagsRequest parent. */ - public parent: string; - - /** ListTagsRequest pageSize. */ - public pageSize: number; - - /** ListTagsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListTagsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTagsRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListTagsRequest): google.cloud.datacatalog.v1beta1.ListTagsRequest; - - /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. - * @param message ListTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTagsRequest; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTagsRequest; - - /** - * Verifies a ListTagsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTagsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTagsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTagsRequest; - - /** - * Creates a plain object from a ListTagsRequest message. Also converts values to other types if specified. - * @param message ListTagsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTagsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTagsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTagsResponse. */ - interface IListTagsResponse { - - /** ListTagsResponse tags */ - tags?: (google.cloud.datacatalog.v1beta1.ITag[]|null); - - /** ListTagsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListTagsResponse. */ - class ListTagsResponse implements IListTagsResponse { - - /** - * Constructs a new ListTagsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListTagsResponse); - - /** ListTagsResponse tags. */ - public tags: google.cloud.datacatalog.v1beta1.ITag[]; - - /** ListTagsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTagsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTagsResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListTagsResponse): google.cloud.datacatalog.v1beta1.ListTagsResponse; - - /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. - * @param message ListTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTagsResponse; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTagsResponse; - - /** - * Verifies a ListTagsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTagsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTagsResponse; - - /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. - * @param message ListTagsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTagsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTagsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntriesRequest. */ - interface IListEntriesRequest { - - /** ListEntriesRequest parent */ - parent?: (string|null); - - /** ListEntriesRequest pageSize */ - pageSize?: (number|null); - - /** ListEntriesRequest pageToken */ - pageToken?: (string|null); - - /** ListEntriesRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a ListEntriesRequest. */ - class ListEntriesRequest implements IListEntriesRequest { - - /** - * Constructs a new ListEntriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListEntriesRequest); - - /** ListEntriesRequest parent. */ - public parent: string; - - /** ListEntriesRequest pageSize. */ - public pageSize: number; - - /** ListEntriesRequest pageToken. */ - public pageToken: string; - - /** ListEntriesRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new ListEntriesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntriesRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListEntriesRequest): google.cloud.datacatalog.v1beta1.ListEntriesRequest; - - /** - * Encodes the specified ListEntriesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntriesRequest.verify|verify} messages. - * @param message ListEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntriesRequest.verify|verify} messages. - * @param message ListEntriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListEntriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListEntriesRequest; - - /** - * Decodes a ListEntriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListEntriesRequest; - - /** - * Verifies a ListEntriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntriesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListEntriesRequest; - - /** - * Creates a plain object from a ListEntriesRequest message. Also converts values to other types if specified. - * @param message ListEntriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntriesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEntriesResponse. */ - interface IListEntriesResponse { - - /** ListEntriesResponse entries */ - entries?: (google.cloud.datacatalog.v1beta1.IEntry[]|null); - - /** ListEntriesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEntriesResponse. */ - class ListEntriesResponse implements IListEntriesResponse { - - /** - * Constructs a new ListEntriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListEntriesResponse); - - /** ListEntriesResponse entries. */ - public entries: google.cloud.datacatalog.v1beta1.IEntry[]; - - /** ListEntriesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEntriesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEntriesResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListEntriesResponse): google.cloud.datacatalog.v1beta1.ListEntriesResponse; - - /** - * Encodes the specified ListEntriesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntriesResponse.verify|verify} messages. - * @param message ListEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntriesResponse.verify|verify} messages. - * @param message ListEntriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListEntriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEntriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListEntriesResponse; - - /** - * Decodes a ListEntriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListEntriesResponse; - - /** - * Verifies a ListEntriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEntriesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListEntriesResponse; - - /** - * Creates a plain object from a ListEntriesResponse message. Also converts values to other types if specified. - * @param message ListEntriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEntriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEntriesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** EntryType enum. */ - enum EntryType { - ENTRY_TYPE_UNSPECIFIED = 0, - TABLE = 2, - MODEL = 5, - DATA_STREAM = 3, - FILESET = 4 - } - - /** Properties of a GcsFilesetSpec. */ - interface IGcsFilesetSpec { - - /** GcsFilesetSpec filePatterns */ - filePatterns?: (string[]|null); - - /** GcsFilesetSpec sampleGcsFileSpecs */ - sampleGcsFileSpecs?: (google.cloud.datacatalog.v1beta1.IGcsFileSpec[]|null); - } - - /** Represents a GcsFilesetSpec. */ - class GcsFilesetSpec implements IGcsFilesetSpec { - - /** - * Constructs a new GcsFilesetSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec); - - /** GcsFilesetSpec filePatterns. */ - public filePatterns: string[]; - - /** GcsFilesetSpec sampleGcsFileSpecs. */ - public sampleGcsFileSpecs: google.cloud.datacatalog.v1beta1.IGcsFileSpec[]; - - /** - * Creates a new GcsFilesetSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsFilesetSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; - - /** - * Encodes the specified GcsFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. - * @param message GcsFilesetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. - * @param message GcsFilesetSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGcsFilesetSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; - - /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; - - /** - * Verifies a GcsFilesetSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsFilesetSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsFilesetSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GcsFilesetSpec; - - /** - * Creates a plain object from a GcsFilesetSpec message. Also converts values to other types if specified. - * @param message GcsFilesetSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GcsFilesetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsFilesetSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsFilesetSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcsFileSpec. */ - interface IGcsFileSpec { - - /** GcsFileSpec filePath */ - filePath?: (string|null); - - /** GcsFileSpec gcsTimestamps */ - gcsTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); - - /** GcsFileSpec sizeBytes */ - sizeBytes?: (number|Long|string|null); - } - - /** Represents a GcsFileSpec. */ - class GcsFileSpec implements IGcsFileSpec { - - /** - * Constructs a new GcsFileSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGcsFileSpec); - - /** GcsFileSpec filePath. */ - public filePath: string; - - /** GcsFileSpec gcsTimestamps. */ - public gcsTimestamps?: (google.cloud.datacatalog.v1beta1.ISystemTimestamps|null); - - /** GcsFileSpec sizeBytes. */ - public sizeBytes: (number|Long|string); - - /** - * Creates a new GcsFileSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsFileSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGcsFileSpec): google.cloud.datacatalog.v1beta1.GcsFileSpec; - - /** - * Encodes the specified GcsFileSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. - * @param message GcsFileSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGcsFileSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcsFileSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. - * @param message GcsFileSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGcsFileSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcsFileSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsFileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GcsFileSpec; - - /** - * Decodes a GcsFileSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsFileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GcsFileSpec; - - /** - * Verifies a GcsFileSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcsFileSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsFileSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GcsFileSpec; - - /** - * Creates a plain object from a GcsFileSpec message. Also converts values to other types if specified. - * @param message GcsFileSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GcsFileSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsFileSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsFileSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SystemTimestamps. */ - interface ISystemTimestamps { - - /** SystemTimestamps createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** SystemTimestamps updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** SystemTimestamps expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a SystemTimestamps. */ - class SystemTimestamps implements ISystemTimestamps { - - /** - * Constructs a new SystemTimestamps. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISystemTimestamps); - - /** SystemTimestamps createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** SystemTimestamps updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** SystemTimestamps expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new SystemTimestamps instance using the specified properties. - * @param [properties] Properties to set - * @returns SystemTimestamps instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISystemTimestamps): google.cloud.datacatalog.v1beta1.SystemTimestamps; - - /** - * Encodes the specified SystemTimestamps message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. - * @param message SystemTimestamps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISystemTimestamps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SystemTimestamps message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. - * @param message SystemTimestamps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISystemTimestamps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SystemTimestamps message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SystemTimestamps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SystemTimestamps; - - /** - * Decodes a SystemTimestamps message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SystemTimestamps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SystemTimestamps; - - /** - * Verifies a SystemTimestamps message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SystemTimestamps message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SystemTimestamps - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SystemTimestamps; - - /** - * Creates a plain object from a SystemTimestamps message. Also converts values to other types if specified. - * @param message SystemTimestamps - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SystemTimestamps, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SystemTimestamps to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SystemTimestamps - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Schema. */ - interface ISchema { - - /** Schema columns */ - columns?: (google.cloud.datacatalog.v1beta1.IColumnSchema[]|null); - } - - /** Represents a Schema. */ - class Schema implements ISchema { - - /** - * Constructs a new Schema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISchema); - - /** Schema columns. */ - public columns: google.cloud.datacatalog.v1beta1.IColumnSchema[]; - - /** - * Creates a new Schema instance using the specified properties. - * @param [properties] Properties to set - * @returns Schema instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISchema): google.cloud.datacatalog.v1beta1.Schema; - - /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Schema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Schema; - - /** - * Decodes a Schema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Schema; - - /** - * Verifies a Schema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Schema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Schema; - - /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @param message Schema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Schema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Schema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ColumnSchema. */ - interface IColumnSchema { - - /** ColumnSchema column */ - column?: (string|null); - - /** ColumnSchema type */ - type?: (string|null); - - /** ColumnSchema description */ - description?: (string|null); - - /** ColumnSchema mode */ - mode?: (string|null); - - /** ColumnSchema subcolumns */ - subcolumns?: (google.cloud.datacatalog.v1beta1.IColumnSchema[]|null); - } - - /** Represents a ColumnSchema. */ - class ColumnSchema implements IColumnSchema { - - /** - * Constructs a new ColumnSchema. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IColumnSchema); - - /** ColumnSchema column. */ - public column: string; - - /** ColumnSchema type. */ - public type: string; - - /** ColumnSchema description. */ - public description: string; - - /** ColumnSchema mode. */ - public mode: string; - - /** ColumnSchema subcolumns. */ - public subcolumns: google.cloud.datacatalog.v1beta1.IColumnSchema[]; - - /** - * Creates a new ColumnSchema instance using the specified properties. - * @param [properties] Properties to set - * @returns ColumnSchema instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IColumnSchema): google.cloud.datacatalog.v1beta1.ColumnSchema; - - /** - * Encodes the specified ColumnSchema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. - * @param message ColumnSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IColumnSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ColumnSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. - * @param message ColumnSchema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IColumnSchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ColumnSchema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ColumnSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ColumnSchema; - - /** - * Decodes a ColumnSchema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ColumnSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ColumnSchema; - - /** - * Verifies a ColumnSchema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ColumnSchema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ColumnSchema - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ColumnSchema; - - /** - * Creates a plain object from a ColumnSchema message. Also converts values to other types if specified. - * @param message ColumnSchema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ColumnSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ColumnSchema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ColumnSchema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SearchCatalogResult. */ - interface ISearchCatalogResult { - - /** SearchCatalogResult searchResultType */ - searchResultType?: (google.cloud.datacatalog.v1beta1.SearchResultType|keyof typeof google.cloud.datacatalog.v1beta1.SearchResultType|null); - - /** SearchCatalogResult searchResultSubtype */ - searchResultSubtype?: (string|null); - - /** SearchCatalogResult relativeResourceName */ - relativeResourceName?: (string|null); - - /** SearchCatalogResult linkedResource */ - linkedResource?: (string|null); - } - - /** Represents a SearchCatalogResult. */ - class SearchCatalogResult implements ISearchCatalogResult { - - /** - * Constructs a new SearchCatalogResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResult); - - /** SearchCatalogResult searchResultType. */ - public searchResultType: (google.cloud.datacatalog.v1beta1.SearchResultType|keyof typeof google.cloud.datacatalog.v1beta1.SearchResultType); - - /** SearchCatalogResult searchResultSubtype. */ - public searchResultSubtype: string; - - /** SearchCatalogResult relativeResourceName. */ - public relativeResourceName: string; - - /** SearchCatalogResult linkedResource. */ - public linkedResource: string; - - /** - * Creates a new SearchCatalogResult instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchCatalogResult instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISearchCatalogResult): google.cloud.datacatalog.v1beta1.SearchCatalogResult; - - /** - * Encodes the specified SearchCatalogResult message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. - * @param message SearchCatalogResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchCatalogResult message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. - * @param message SearchCatalogResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISearchCatalogResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchCatalogResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchCatalogResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SearchCatalogResult; - - /** - * Decodes a SearchCatalogResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchCatalogResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SearchCatalogResult; - - /** - * Verifies a SearchCatalogResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchCatalogResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchCatalogResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SearchCatalogResult; - - /** - * Creates a plain object from a SearchCatalogResult message. Also converts values to other types if specified. - * @param message SearchCatalogResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SearchCatalogResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchCatalogResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchCatalogResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** SearchResultType enum. */ - enum SearchResultType { - SEARCH_RESULT_TYPE_UNSPECIFIED = 0, - ENTRY = 1, - TAG_TEMPLATE = 2, - ENTRY_GROUP = 3 - } - - /** Properties of a BigQueryTableSpec. */ - interface IBigQueryTableSpec { - - /** BigQueryTableSpec tableSourceType */ - tableSourceType?: (google.cloud.datacatalog.v1beta1.TableSourceType|keyof typeof google.cloud.datacatalog.v1beta1.TableSourceType|null); - - /** BigQueryTableSpec viewSpec */ - viewSpec?: (google.cloud.datacatalog.v1beta1.IViewSpec|null); - - /** BigQueryTableSpec tableSpec */ - tableSpec?: (google.cloud.datacatalog.v1beta1.ITableSpec|null); - } - - /** Represents a BigQueryTableSpec. */ - class BigQueryTableSpec implements IBigQueryTableSpec { - - /** - * Constructs a new BigQueryTableSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec); - - /** BigQueryTableSpec tableSourceType. */ - public tableSourceType: (google.cloud.datacatalog.v1beta1.TableSourceType|keyof typeof google.cloud.datacatalog.v1beta1.TableSourceType); - - /** BigQueryTableSpec viewSpec. */ - public viewSpec?: (google.cloud.datacatalog.v1beta1.IViewSpec|null); - - /** BigQueryTableSpec tableSpec. */ - public tableSpec?: (google.cloud.datacatalog.v1beta1.ITableSpec|null); - - /** BigQueryTableSpec typeSpec. */ - public typeSpec?: ("viewSpec"|"tableSpec"); - - /** - * Creates a new BigQueryTableSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryTableSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; - - /** - * Encodes the specified BigQueryTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. - * @param message BigQueryTableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. - * @param message BigQueryTableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IBigQueryTableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; - - /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; - - /** - * Verifies a BigQueryTableSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryTableSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryTableSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.BigQueryTableSpec; - - /** - * Creates a plain object from a BigQueryTableSpec message. Also converts values to other types if specified. - * @param message BigQueryTableSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.BigQueryTableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryTableSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryTableSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** TableSourceType enum. */ - enum TableSourceType { - TABLE_SOURCE_TYPE_UNSPECIFIED = 0, - BIGQUERY_VIEW = 2, - BIGQUERY_TABLE = 5 - } - - /** Properties of a ViewSpec. */ - interface IViewSpec { - - /** ViewSpec viewQuery */ - viewQuery?: (string|null); - } - - /** Represents a ViewSpec. */ - class ViewSpec implements IViewSpec { - - /** - * Constructs a new ViewSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IViewSpec); - - /** ViewSpec viewQuery. */ - public viewQuery: string; - - /** - * Creates a new ViewSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns ViewSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IViewSpec): google.cloud.datacatalog.v1beta1.ViewSpec; - - /** - * Encodes the specified ViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. - * @param message ViewSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. - * @param message ViewSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IViewSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ViewSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ViewSpec; - - /** - * Decodes a ViewSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ViewSpec; - - /** - * Verifies a ViewSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ViewSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ViewSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ViewSpec; - - /** - * Creates a plain object from a ViewSpec message. Also converts values to other types if specified. - * @param message ViewSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ViewSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ViewSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ViewSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TableSpec. */ - interface ITableSpec { - - /** TableSpec groupedEntry */ - groupedEntry?: (string|null); - } - - /** Represents a TableSpec. */ - class TableSpec implements ITableSpec { - - /** - * Constructs a new TableSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITableSpec); - - /** TableSpec groupedEntry. */ - public groupedEntry: string; - - /** - * Creates a new TableSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns TableSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITableSpec): google.cloud.datacatalog.v1beta1.TableSpec; - - /** - * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. - * @param message TableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. - * @param message TableSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITableSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TableSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TableSpec; - - /** - * Decodes a TableSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TableSpec; - - /** - * Verifies a TableSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TableSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TableSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TableSpec; - - /** - * Creates a plain object from a TableSpec message. Also converts values to other types if specified. - * @param message TableSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TableSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TableSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TableSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BigQueryDateShardedSpec. */ - interface IBigQueryDateShardedSpec { - - /** BigQueryDateShardedSpec dataset */ - dataset?: (string|null); - - /** BigQueryDateShardedSpec tablePrefix */ - tablePrefix?: (string|null); - - /** BigQueryDateShardedSpec shardCount */ - shardCount?: (number|Long|string|null); - } - - /** Represents a BigQueryDateShardedSpec. */ - class BigQueryDateShardedSpec implements IBigQueryDateShardedSpec { - - /** - * Constructs a new BigQueryDateShardedSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec); - - /** BigQueryDateShardedSpec dataset. */ - public dataset: string; - - /** BigQueryDateShardedSpec tablePrefix. */ - public tablePrefix: string; - - /** BigQueryDateShardedSpec shardCount. */ - public shardCount: (number|Long|string); - - /** - * Creates a new BigQueryDateShardedSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryDateShardedSpec instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; - - /** - * Encodes the specified BigQueryDateShardedSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. - * @param message BigQueryDateShardedSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryDateShardedSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. - * @param message BigQueryDateShardedSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryDateShardedSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; - - /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryDateShardedSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; - - /** - * Verifies a BigQueryDateShardedSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryDateShardedSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryDateShardedSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec; - - /** - * Creates a plain object from a BigQueryDateShardedSpec message. Also converts values to other types if specified. - * @param message BigQueryDateShardedSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryDateShardedSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryDateShardedSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Tag. */ - interface ITag { - - /** Tag name */ - name?: (string|null); - - /** Tag template */ - template?: (string|null); - - /** Tag templateDisplayName */ - templateDisplayName?: (string|null); - - /** Tag column */ - column?: (string|null); - - /** Tag fields */ - fields?: ({ [k: string]: google.cloud.datacatalog.v1beta1.ITagField }|null); - } - - /** Represents a Tag. */ - class Tag implements ITag { - - /** - * Constructs a new Tag. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITag); - - /** Tag name. */ - public name: string; - - /** Tag template. */ - public template: string; - - /** Tag templateDisplayName. */ - public templateDisplayName: string; - - /** Tag column. */ - public column?: (string|null); - - /** Tag fields. */ - public fields: { [k: string]: google.cloud.datacatalog.v1beta1.ITagField }; - - /** Tag scope. */ - public scope?: "column"; - - /** - * Creates a new Tag instance using the specified properties. - * @param [properties] Properties to set - * @returns Tag instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITag): google.cloud.datacatalog.v1beta1.Tag; - - /** - * Encodes the specified Tag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. - * @param message Tag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Tag; - - /** - * Decodes a Tag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Tag; - - /** - * Verifies a Tag message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tag - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Tag; - - /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @param message Tag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Tag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TagField. */ - interface ITagField { - - /** TagField displayName */ - displayName?: (string|null); - - /** TagField doubleValue */ - doubleValue?: (number|null); - - /** TagField stringValue */ - stringValue?: (string|null); - - /** TagField boolValue */ - boolValue?: (boolean|null); - - /** TagField timestampValue */ - timestampValue?: (google.protobuf.ITimestamp|null); - - /** TagField enumValue */ - enumValue?: (google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null); - - /** TagField order */ - order?: (number|null); - } - - /** Represents a TagField. */ - class TagField implements ITagField { - - /** - * Constructs a new TagField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITagField); - - /** TagField displayName. */ - public displayName: string; - - /** TagField doubleValue. */ - public doubleValue?: (number|null); - - /** TagField stringValue. */ - public stringValue?: (string|null); - - /** TagField boolValue. */ - public boolValue?: (boolean|null); - - /** TagField timestampValue. */ - public timestampValue?: (google.protobuf.ITimestamp|null); - - /** TagField enumValue. */ - public enumValue?: (google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null); - - /** TagField order. */ - public order: number; - - /** TagField kind. */ - public kind?: ("doubleValue"|"stringValue"|"boolValue"|"timestampValue"|"enumValue"); - - /** - * Creates a new TagField instance using the specified properties. - * @param [properties] Properties to set - * @returns TagField instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITagField): google.cloud.datacatalog.v1beta1.TagField; - - /** - * Encodes the specified TagField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. - * @param message TagField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITagField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TagField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. - * @param message TagField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITagField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TagField message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TagField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagField; - - /** - * Decodes a TagField message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TagField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagField; - - /** - * Verifies a TagField message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TagField message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TagField - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagField; - - /** - * Creates a plain object from a TagField message. Also converts values to other types if specified. - * @param message TagField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TagField, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TagField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TagField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TagField { - - /** Properties of an EnumValue. */ - interface IEnumValue { - - /** EnumValue displayName */ - displayName?: (string|null); - } - - /** Represents an EnumValue. */ - class EnumValue implements IEnumValue { - - /** - * Constructs a new EnumValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.TagField.IEnumValue); - - /** EnumValue displayName. */ - public displayName: string; - - /** - * Creates a new EnumValue instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValue instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.TagField.IEnumValue): google.cloud.datacatalog.v1beta1.TagField.EnumValue; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.TagField.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.TagField.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagField.EnumValue; - - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagField.EnumValue; - - /** - * Verifies an EnumValue message. - * @param message Plain 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 EnumValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagField.EnumValue; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @param message EnumValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TagField.EnumValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a TagTemplate. */ - interface ITagTemplate { - - /** TagTemplate name */ - name?: (string|null); - - /** TagTemplate displayName */ - displayName?: (string|null); - - /** TagTemplate fields */ - fields?: ({ [k: string]: google.cloud.datacatalog.v1beta1.ITagTemplateField }|null); - } - - /** Represents a TagTemplate. */ - class TagTemplate implements ITagTemplate { - - /** - * Constructs a new TagTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITagTemplate); - - /** TagTemplate name. */ - public name: string; - - /** TagTemplate displayName. */ - public displayName: string; - - /** TagTemplate fields. */ - public fields: { [k: string]: google.cloud.datacatalog.v1beta1.ITagTemplateField }; - - /** - * Creates a new TagTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns TagTemplate instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITagTemplate): google.cloud.datacatalog.v1beta1.TagTemplate; - - /** - * Encodes the specified TagTemplate message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. - * @param message TagTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITagTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TagTemplate message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. - * @param message TagTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITagTemplate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TagTemplate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TagTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagTemplate; - - /** - * Decodes a TagTemplate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TagTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagTemplate; - - /** - * Verifies a TagTemplate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TagTemplate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TagTemplate - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagTemplate; - - /** - * Creates a plain object from a TagTemplate message. Also converts values to other types if specified. - * @param message TagTemplate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TagTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TagTemplate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TagTemplate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TagTemplateField. */ - interface ITagTemplateField { - - /** TagTemplateField name */ - name?: (string|null); - - /** TagTemplateField displayName */ - displayName?: (string|null); - - /** TagTemplateField type */ - type?: (google.cloud.datacatalog.v1beta1.IFieldType|null); - - /** TagTemplateField isRequired */ - isRequired?: (boolean|null); - - /** TagTemplateField order */ - order?: (number|null); - } - - /** Represents a TagTemplateField. */ - class TagTemplateField implements ITagTemplateField { - - /** - * Constructs a new TagTemplateField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITagTemplateField); - - /** TagTemplateField name. */ - public name: string; - - /** TagTemplateField displayName. */ - public displayName: string; - - /** TagTemplateField type. */ - public type?: (google.cloud.datacatalog.v1beta1.IFieldType|null); - - /** TagTemplateField isRequired. */ - public isRequired: boolean; - - /** TagTemplateField order. */ - public order: number; - - /** - * Creates a new TagTemplateField instance using the specified properties. - * @param [properties] Properties to set - * @returns TagTemplateField instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITagTemplateField): google.cloud.datacatalog.v1beta1.TagTemplateField; - - /** - * Encodes the specified TagTemplateField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. - * @param message TagTemplateField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITagTemplateField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TagTemplateField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. - * @param message TagTemplateField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITagTemplateField, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TagTemplateField message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TagTemplateField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.TagTemplateField; - - /** - * Decodes a TagTemplateField message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TagTemplateField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.TagTemplateField; - - /** - * Verifies a TagTemplateField message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TagTemplateField message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TagTemplateField - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.TagTemplateField; - - /** - * Creates a plain object from a TagTemplateField message. Also converts values to other types if specified. - * @param message TagTemplateField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.TagTemplateField, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TagTemplateField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TagTemplateField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldType. */ - interface IFieldType { - - /** FieldType primitiveType */ - primitiveType?: (google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|keyof typeof google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|null); - - /** FieldType enumType */ - enumType?: (google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null); - } - - /** Represents a FieldType. */ - class FieldType implements IFieldType { - - /** - * Constructs a new FieldType. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IFieldType); - - /** FieldType primitiveType. */ - public primitiveType?: (google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|keyof typeof google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|null); - - /** FieldType enumType. */ - public enumType?: (google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null); - - /** FieldType typeDecl. */ - public typeDecl?: ("primitiveType"|"enumType"); - - /** - * Creates a new FieldType instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldType instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IFieldType): google.cloud.datacatalog.v1beta1.FieldType; - - /** - * Encodes the specified FieldType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. - * @param message FieldType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IFieldType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. - * @param message FieldType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IFieldType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.FieldType; - - /** - * Decodes a FieldType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.FieldType; - - /** - * Verifies a FieldType message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldType - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.FieldType; - - /** - * Creates a plain object from a FieldType message. Also converts values to other types if specified. - * @param message FieldType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.FieldType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldType - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldType { - - /** Properties of an EnumType. */ - interface IEnumType { - - /** EnumType allowedValues */ - allowedValues?: (google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue[]|null); - } - - /** Represents an EnumType. */ - class EnumType implements IEnumType { - - /** - * Constructs a new EnumType. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.FieldType.IEnumType); - - /** EnumType allowedValues. */ - public allowedValues: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue[]; - - /** - * Creates a new EnumType instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumType instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.FieldType.IEnumType): google.cloud.datacatalog.v1beta1.FieldType.EnumType; - - /** - * Encodes the specified EnumType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. - * @param message EnumType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.FieldType.IEnumType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. - * @param message EnumType message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.FieldType.IEnumType, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumType message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.FieldType.EnumType; - - /** - * Decodes an EnumType message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.FieldType.EnumType; - - /** - * Verifies an EnumType message. - * @param message Plain 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 EnumType message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumType - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.FieldType.EnumType; - - /** - * Creates a plain object from an EnumType message. Also converts values to other types if specified. - * @param message EnumType - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumType to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumType - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumType { - - /** Properties of an EnumValue. */ - interface IEnumValue { - - /** EnumValue displayName */ - displayName?: (string|null); - } - - /** Represents an EnumValue. */ - class EnumValue implements IEnumValue { - - /** - * Constructs a new EnumValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue); - - /** EnumValue displayName. */ - public displayName: string; - - /** - * Creates a new EnumValue instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValue instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @param message EnumValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; - - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; - - /** - * Verifies an EnumValue message. - * @param message Plain 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 EnumValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @param message EnumValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** PrimitiveType enum. */ - enum PrimitiveType { - PRIMITIVE_TYPE_UNSPECIFIED = 0, - DOUBLE = 1, - STRING = 2, - BOOL = 3, - TIMESTAMP = 4 - } - } - - /** Represents a PolicyTagManager */ - class PolicyTagManager extends $protobuf.rpc.Service { - - /** - * Constructs a new PolicyTagManager 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 PolicyTagManager 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): PolicyTagManager; - - /** - * Calls CreateTaxonomy. - * @param request CreateTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Taxonomy - */ - public createTaxonomy(request: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomyCallback): void; - - /** - * Calls CreateTaxonomy. - * @param request CreateTaxonomyRequest message or plain object - * @returns Promise - */ - public createTaxonomy(request: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest): Promise; - - /** - * Calls DeleteTaxonomy. - * @param request DeleteTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTaxonomy(request: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomyCallback): void; - - /** - * Calls DeleteTaxonomy. - * @param request DeleteTaxonomyRequest message or plain object - * @returns Promise - */ - public deleteTaxonomy(request: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest): Promise; - - /** - * Calls UpdateTaxonomy. - * @param request UpdateTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Taxonomy - */ - public updateTaxonomy(request: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomyCallback): void; - - /** - * Calls UpdateTaxonomy. - * @param request UpdateTaxonomyRequest message or plain object - * @returns Promise - */ - public updateTaxonomy(request: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest): Promise; - - /** - * Calls ListTaxonomies. - * @param request ListTaxonomiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTaxonomiesResponse - */ - public listTaxonomies(request: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomiesCallback): void; - - /** - * Calls ListTaxonomies. - * @param request ListTaxonomiesRequest message or plain object - * @returns Promise - */ - public listTaxonomies(request: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest): Promise; - - /** - * Calls GetTaxonomy. - * @param request GetTaxonomyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Taxonomy - */ - public getTaxonomy(request: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomyCallback): void; - - /** - * Calls GetTaxonomy. - * @param request GetTaxonomyRequest message or plain object - * @returns Promise - */ - public getTaxonomy(request: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest): Promise; - - /** - * Calls CreatePolicyTag. - * @param request CreatePolicyTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PolicyTag - */ - public createPolicyTag(request: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTagCallback): void; - - /** - * Calls CreatePolicyTag. - * @param request CreatePolicyTagRequest message or plain object - * @returns Promise - */ - public createPolicyTag(request: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest): Promise; - - /** - * Calls DeletePolicyTag. - * @param request DeletePolicyTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deletePolicyTag(request: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTagCallback): void; - - /** - * Calls DeletePolicyTag. - * @param request DeletePolicyTagRequest message or plain object - * @returns Promise - */ - public deletePolicyTag(request: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest): Promise; - - /** - * Calls UpdatePolicyTag. - * @param request UpdatePolicyTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PolicyTag - */ - public updatePolicyTag(request: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTagCallback): void; - - /** - * Calls UpdatePolicyTag. - * @param request UpdatePolicyTagRequest message or plain object - * @returns Promise - */ - public updatePolicyTag(request: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest): Promise; - - /** - * Calls ListPolicyTags. - * @param request ListPolicyTagsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPolicyTagsResponse - */ - public listPolicyTags(request: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTagsCallback): void; - - /** - * Calls ListPolicyTags. - * @param request ListPolicyTagsRequest message or plain object - * @returns Promise - */ - public listPolicyTags(request: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest): Promise; - - /** - * Calls GetPolicyTag. - * @param request GetPolicyTagRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PolicyTag - */ - public getPolicyTag(request: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTagCallback): void; - - /** - * Calls GetPolicyTag. - * @param request GetPolicyTagRequest message or plain object - * @returns Promise - */ - public getPolicyTag(request: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest): Promise; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetIamPolicyCallback): void; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.SetIamPolicyCallback): void; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManager.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace PolicyTagManager { - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|createTaxonomy}. - * @param error Error, if any - * @param [response] Taxonomy - */ - type CreateTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Taxonomy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|deleteTaxonomy}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTaxonomyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|updateTaxonomy}. - * @param error Error, if any - * @param [response] Taxonomy - */ - type UpdateTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Taxonomy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|listTaxonomies}. - * @param error Error, if any - * @param [response] ListTaxonomiesResponse - */ - type ListTaxonomiesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|getTaxonomy}. - * @param error Error, if any - * @param [response] Taxonomy - */ - type GetTaxonomyCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.Taxonomy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|createPolicyTag}. - * @param error Error, if any - * @param [response] PolicyTag - */ - type CreatePolicyTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.PolicyTag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|deletePolicyTag}. - * @param error Error, if any - * @param [response] Empty - */ - type DeletePolicyTagCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|updatePolicyTag}. - * @param error Error, if any - * @param [response] PolicyTag - */ - type UpdatePolicyTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.PolicyTag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|listPolicyTags}. - * @param error Error, if any - * @param [response] ListPolicyTagsResponse - */ - type ListPolicyTagsCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|getPolicyTag}. - * @param error Error, if any - * @param [response] PolicyTag - */ - type GetPolicyTagCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.PolicyTag) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a Taxonomy. */ - interface ITaxonomy { - - /** Taxonomy name */ - name?: (string|null); - - /** Taxonomy displayName */ - displayName?: (string|null); - - /** Taxonomy description */ - description?: (string|null); - - /** Taxonomy activatedPolicyTypes */ - activatedPolicyTypes?: (google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]|null); - } - - /** Represents a Taxonomy. */ - class Taxonomy implements ITaxonomy { - - /** - * Constructs a new Taxonomy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ITaxonomy); - - /** Taxonomy name. */ - public name: string; - - /** Taxonomy displayName. */ - public displayName: string; - - /** Taxonomy description. */ - public description: string; - - /** Taxonomy activatedPolicyTypes. */ - public activatedPolicyTypes: google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[]; - - /** - * Creates a new Taxonomy instance using the specified properties. - * @param [properties] Properties to set - * @returns Taxonomy instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ITaxonomy): google.cloud.datacatalog.v1beta1.Taxonomy; - - /** - * Encodes the specified Taxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.verify|verify} messages. - * @param message Taxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ITaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Taxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.verify|verify} messages. - * @param message Taxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ITaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Taxonomy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Taxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.Taxonomy; - - /** - * Decodes a Taxonomy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Taxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.Taxonomy; - - /** - * Verifies a Taxonomy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Taxonomy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Taxonomy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.Taxonomy; - - /** - * Creates a plain object from a Taxonomy message. Also converts values to other types if specified. - * @param message Taxonomy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.Taxonomy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Taxonomy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Taxonomy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Taxonomy { - - /** PolicyType enum. */ - enum PolicyType { - POLICY_TYPE_UNSPECIFIED = 0, - FINE_GRAINED_ACCESS_CONTROL = 1 - } - } - - /** Properties of a PolicyTag. */ - interface IPolicyTag { - - /** PolicyTag name */ - name?: (string|null); - - /** PolicyTag displayName */ - displayName?: (string|null); - - /** PolicyTag description */ - description?: (string|null); - - /** PolicyTag parentPolicyTag */ - parentPolicyTag?: (string|null); - - /** PolicyTag childPolicyTags */ - childPolicyTags?: (string[]|null); - } - - /** Represents a PolicyTag. */ - class PolicyTag implements IPolicyTag { - - /** - * Constructs a new PolicyTag. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IPolicyTag); - - /** PolicyTag name. */ - public name: string; - - /** PolicyTag displayName. */ - public displayName: string; - - /** PolicyTag description. */ - public description: string; - - /** PolicyTag parentPolicyTag. */ - public parentPolicyTag: string; - - /** PolicyTag childPolicyTags. */ - public childPolicyTags: string[]; - - /** - * Creates a new PolicyTag instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyTag instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IPolicyTag): google.cloud.datacatalog.v1beta1.PolicyTag; - - /** - * Encodes the specified PolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.PolicyTag.verify|verify} messages. - * @param message PolicyTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.PolicyTag.verify|verify} messages. - * @param message PolicyTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyTag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.PolicyTag; - - /** - * Decodes a PolicyTag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.PolicyTag; - - /** - * Verifies a PolicyTag message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PolicyTag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyTag - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.PolicyTag; - - /** - * Creates a plain object from a PolicyTag message. Also converts values to other types if specified. - * @param message PolicyTag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.PolicyTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PolicyTag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PolicyTag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTaxonomyRequest. */ - interface ICreateTaxonomyRequest { - - /** CreateTaxonomyRequest parent */ - parent?: (string|null); - - /** CreateTaxonomyRequest taxonomy */ - taxonomy?: (google.cloud.datacatalog.v1beta1.ITaxonomy|null); - } - - /** Represents a CreateTaxonomyRequest. */ - class CreateTaxonomyRequest implements ICreateTaxonomyRequest { - - /** - * Constructs a new CreateTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest); - - /** CreateTaxonomyRequest parent. */ - public parent: string; - - /** CreateTaxonomyRequest taxonomy. */ - public taxonomy?: (google.cloud.datacatalog.v1beta1.ITaxonomy|null); - - /** - * Creates a new CreateTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTaxonomyRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest): google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest; - - /** - * Encodes the specified CreateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.verify|verify} messages. - * @param message CreateTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.verify|verify} messages. - * @param message CreateTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest; - - /** - * Decodes a CreateTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest; - - /** - * Verifies a CreateTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest; - - /** - * Creates a plain object from a CreateTaxonomyRequest message. Also converts values to other types if specified. - * @param message CreateTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTaxonomyRequest. */ - interface IDeleteTaxonomyRequest { - - /** DeleteTaxonomyRequest name */ - name?: (string|null); - } - - /** Represents a DeleteTaxonomyRequest. */ - class DeleteTaxonomyRequest implements IDeleteTaxonomyRequest { - - /** - * Constructs a new DeleteTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest); - - /** DeleteTaxonomyRequest name. */ - public name: string; - - /** - * Creates a new DeleteTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTaxonomyRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest): google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest; - - /** - * Encodes the specified DeleteTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest.verify|verify} messages. - * @param message DeleteTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest.verify|verify} messages. - * @param message DeleteTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest; - - /** - * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest; - - /** - * Verifies a DeleteTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest; - - /** - * Creates a plain object from a DeleteTaxonomyRequest message. Also converts values to other types if specified. - * @param message DeleteTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTaxonomyRequest. */ - interface IUpdateTaxonomyRequest { - - /** UpdateTaxonomyRequest taxonomy */ - taxonomy?: (google.cloud.datacatalog.v1beta1.ITaxonomy|null); - - /** UpdateTaxonomyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTaxonomyRequest. */ - class UpdateTaxonomyRequest implements IUpdateTaxonomyRequest { - - /** - * Constructs a new UpdateTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest); - - /** UpdateTaxonomyRequest taxonomy. */ - public taxonomy?: (google.cloud.datacatalog.v1beta1.ITaxonomy|null); - - /** UpdateTaxonomyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTaxonomyRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest): google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest; - - /** - * Encodes the specified UpdateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.verify|verify} messages. - * @param message UpdateTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.verify|verify} messages. - * @param message UpdateTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest; - - /** - * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest; - - /** - * Verifies an UpdateTaxonomyRequest message. - * @param message Plain 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 UpdateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest; - - /** - * Creates a plain object from an UpdateTaxonomyRequest message. Also converts values to other types if specified. - * @param message UpdateTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTaxonomiesRequest. */ - interface IListTaxonomiesRequest { - - /** ListTaxonomiesRequest parent */ - parent?: (string|null); - - /** ListTaxonomiesRequest pageSize */ - pageSize?: (number|null); - - /** ListTaxonomiesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListTaxonomiesRequest. */ - class ListTaxonomiesRequest implements IListTaxonomiesRequest { - - /** - * Constructs a new ListTaxonomiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest); - - /** ListTaxonomiesRequest parent. */ - public parent: string; - - /** ListTaxonomiesRequest pageSize. */ - public pageSize: number; - - /** ListTaxonomiesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListTaxonomiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTaxonomiesRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest): google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest; - - /** - * Encodes the specified ListTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest.verify|verify} messages. - * @param message ListTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest.verify|verify} messages. - * @param message ListTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTaxonomiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest; - - /** - * Decodes a ListTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest; - - /** - * Verifies a ListTaxonomiesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTaxonomiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest; - - /** - * Creates a plain object from a ListTaxonomiesRequest message. Also converts values to other types if specified. - * @param message ListTaxonomiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTaxonomiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTaxonomiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTaxonomiesResponse. */ - interface IListTaxonomiesResponse { - - /** ListTaxonomiesResponse taxonomies */ - taxonomies?: (google.cloud.datacatalog.v1beta1.ITaxonomy[]|null); - - /** ListTaxonomiesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListTaxonomiesResponse. */ - class ListTaxonomiesResponse implements IListTaxonomiesResponse { - - /** - * Constructs a new ListTaxonomiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse); - - /** ListTaxonomiesResponse taxonomies. */ - public taxonomies: google.cloud.datacatalog.v1beta1.ITaxonomy[]; - - /** ListTaxonomiesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTaxonomiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTaxonomiesResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse): google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse; - - /** - * Encodes the specified ListTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.verify|verify} messages. - * @param message ListTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.verify|verify} messages. - * @param message ListTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTaxonomiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse; - - /** - * Decodes a ListTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse; - - /** - * Verifies a ListTaxonomiesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTaxonomiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse; - - /** - * Creates a plain object from a ListTaxonomiesResponse message. Also converts values to other types if specified. - * @param message ListTaxonomiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTaxonomiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTaxonomiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTaxonomyRequest. */ - interface IGetTaxonomyRequest { - - /** GetTaxonomyRequest name */ - name?: (string|null); - } - - /** Represents a GetTaxonomyRequest. */ - class GetTaxonomyRequest implements IGetTaxonomyRequest { - - /** - * Constructs a new GetTaxonomyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest); - - /** GetTaxonomyRequest name. */ - public name: string; - - /** - * Creates a new GetTaxonomyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTaxonomyRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest): google.cloud.datacatalog.v1beta1.GetTaxonomyRequest; - - /** - * Encodes the specified GetTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTaxonomyRequest.verify|verify} messages. - * @param message GetTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTaxonomyRequest.verify|verify} messages. - * @param message GetTaxonomyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTaxonomyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetTaxonomyRequest; - - /** - * Decodes a GetTaxonomyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetTaxonomyRequest; - - /** - * Verifies a GetTaxonomyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTaxonomyRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetTaxonomyRequest; - - /** - * Creates a plain object from a GetTaxonomyRequest message. Also converts values to other types if specified. - * @param message GetTaxonomyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GetTaxonomyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTaxonomyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetTaxonomyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreatePolicyTagRequest. */ - interface ICreatePolicyTagRequest { - - /** CreatePolicyTagRequest parent */ - parent?: (string|null); - - /** CreatePolicyTagRequest policyTag */ - policyTag?: (google.cloud.datacatalog.v1beta1.IPolicyTag|null); - } - - /** Represents a CreatePolicyTagRequest. */ - class CreatePolicyTagRequest implements ICreatePolicyTagRequest { - - /** - * Constructs a new CreatePolicyTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest); - - /** CreatePolicyTagRequest parent. */ - public parent: string; - - /** CreatePolicyTagRequest policyTag. */ - public policyTag?: (google.cloud.datacatalog.v1beta1.IPolicyTag|null); - - /** - * Creates a new CreatePolicyTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreatePolicyTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest): google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest; - - /** - * Encodes the specified CreatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.verify|verify} messages. - * @param message CreatePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.verify|verify} messages. - * @param message CreatePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreatePolicyTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest; - - /** - * Decodes a CreatePolicyTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest; - - /** - * Verifies a CreatePolicyTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreatePolicyTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest; - - /** - * Creates a plain object from a CreatePolicyTagRequest message. Also converts values to other types if specified. - * @param message CreatePolicyTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreatePolicyTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreatePolicyTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeletePolicyTagRequest. */ - interface IDeletePolicyTagRequest { - - /** DeletePolicyTagRequest name */ - name?: (string|null); - } - - /** Represents a DeletePolicyTagRequest. */ - class DeletePolicyTagRequest implements IDeletePolicyTagRequest { - - /** - * Constructs a new DeletePolicyTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest); - - /** DeletePolicyTagRequest name. */ - public name: string; - - /** - * Creates a new DeletePolicyTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeletePolicyTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest): google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest; - - /** - * Encodes the specified DeletePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest.verify|verify} messages. - * @param message DeletePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeletePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest.verify|verify} messages. - * @param message DeletePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeletePolicyTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeletePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest; - - /** - * Decodes a DeletePolicyTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeletePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest; - - /** - * Verifies a DeletePolicyTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeletePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeletePolicyTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest; - - /** - * Creates a plain object from a DeletePolicyTagRequest message. Also converts values to other types if specified. - * @param message DeletePolicyTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeletePolicyTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeletePolicyTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePolicyTagRequest. */ - interface IUpdatePolicyTagRequest { - - /** UpdatePolicyTagRequest policyTag */ - policyTag?: (google.cloud.datacatalog.v1beta1.IPolicyTag|null); - - /** UpdatePolicyTagRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdatePolicyTagRequest. */ - class UpdatePolicyTagRequest implements IUpdatePolicyTagRequest { - - /** - * Constructs a new UpdatePolicyTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest); - - /** UpdatePolicyTagRequest policyTag. */ - public policyTag?: (google.cloud.datacatalog.v1beta1.IPolicyTag|null); - - /** UpdatePolicyTagRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdatePolicyTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePolicyTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest): google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest; - - /** - * Encodes the specified UpdatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.verify|verify} messages. - * @param message UpdatePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.verify|verify} messages. - * @param message UpdatePolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest; - - /** - * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest; - - /** - * Verifies an UpdatePolicyTagRequest message. - * @param message Plain 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 UpdatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePolicyTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest; - - /** - * Creates a plain object from an UpdatePolicyTagRequest message. Also converts values to other types if specified. - * @param message UpdatePolicyTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdatePolicyTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePolicyTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPolicyTagsRequest. */ - interface IListPolicyTagsRequest { - - /** ListPolicyTagsRequest parent */ - parent?: (string|null); - - /** ListPolicyTagsRequest pageSize */ - pageSize?: (number|null); - - /** ListPolicyTagsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListPolicyTagsRequest. */ - class ListPolicyTagsRequest implements IListPolicyTagsRequest { - - /** - * Constructs a new ListPolicyTagsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest); - - /** ListPolicyTagsRequest parent. */ - public parent: string; - - /** ListPolicyTagsRequest pageSize. */ - public pageSize: number; - - /** ListPolicyTagsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListPolicyTagsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPolicyTagsRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest): google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest; - - /** - * Encodes the specified ListPolicyTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest.verify|verify} messages. - * @param message ListPolicyTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPolicyTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest.verify|verify} messages. - * @param message ListPolicyTagsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPolicyTagsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPolicyTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest; - - /** - * Decodes a ListPolicyTagsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPolicyTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest; - - /** - * Verifies a ListPolicyTagsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPolicyTagsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPolicyTagsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest; - - /** - * Creates a plain object from a ListPolicyTagsRequest message. Also converts values to other types if specified. - * @param message ListPolicyTagsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPolicyTagsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPolicyTagsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListPolicyTagsResponse. */ - interface IListPolicyTagsResponse { - - /** ListPolicyTagsResponse policyTags */ - policyTags?: (google.cloud.datacatalog.v1beta1.IPolicyTag[]|null); - - /** ListPolicyTagsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListPolicyTagsResponse. */ - class ListPolicyTagsResponse implements IListPolicyTagsResponse { - - /** - * Constructs a new ListPolicyTagsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse); - - /** ListPolicyTagsResponse policyTags. */ - public policyTags: google.cloud.datacatalog.v1beta1.IPolicyTag[]; - - /** ListPolicyTagsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListPolicyTagsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListPolicyTagsResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse): google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse; - - /** - * Encodes the specified ListPolicyTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.verify|verify} messages. - * @param message ListPolicyTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListPolicyTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.verify|verify} messages. - * @param message ListPolicyTagsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListPolicyTagsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListPolicyTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse; - - /** - * Decodes a ListPolicyTagsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListPolicyTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse; - - /** - * Verifies a ListPolicyTagsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListPolicyTagsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListPolicyTagsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse; - - /** - * Creates a plain object from a ListPolicyTagsResponse message. Also converts values to other types if specified. - * @param message ListPolicyTagsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListPolicyTagsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListPolicyTagsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPolicyTagRequest. */ - interface IGetPolicyTagRequest { - - /** GetPolicyTagRequest name */ - name?: (string|null); - } - - /** Represents a GetPolicyTagRequest. */ - class GetPolicyTagRequest implements IGetPolicyTagRequest { - - /** - * Constructs a new GetPolicyTagRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest); - - /** GetPolicyTagRequest name. */ - public name: string; - - /** - * Creates a new GetPolicyTagRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPolicyTagRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest): google.cloud.datacatalog.v1beta1.GetPolicyTagRequest; - - /** - * Encodes the specified GetPolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetPolicyTagRequest.verify|verify} messages. - * @param message GetPolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetPolicyTagRequest.verify|verify} messages. - * @param message GetPolicyTagRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPolicyTagRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.GetPolicyTagRequest; - - /** - * Decodes a GetPolicyTagRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.GetPolicyTagRequest; - - /** - * Verifies a GetPolicyTagRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPolicyTagRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.GetPolicyTagRequest; - - /** - * Creates a plain object from a GetPolicyTagRequest message. Also converts values to other types if specified. - * @param message GetPolicyTagRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.GetPolicyTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPolicyTagRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPolicyTagRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a PolicyTagManagerSerialization */ - class PolicyTagManagerSerialization extends $protobuf.rpc.Service { - - /** - * Constructs a new PolicyTagManagerSerialization 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 PolicyTagManagerSerialization 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): PolicyTagManagerSerialization; - - /** - * Calls ImportTaxonomies. - * @param request ImportTaxonomiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ImportTaxonomiesResponse - */ - public importTaxonomies(request: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomiesCallback): void; - - /** - * Calls ImportTaxonomies. - * @param request ImportTaxonomiesRequest message or plain object - * @returns Promise - */ - public importTaxonomies(request: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest): Promise; - - /** - * Calls ExportTaxonomies. - * @param request ExportTaxonomiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExportTaxonomiesResponse - */ - public exportTaxonomies(request: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, callback: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomiesCallback): void; - - /** - * Calls ExportTaxonomies. - * @param request ExportTaxonomiesRequest message or plain object - * @returns Promise - */ - public exportTaxonomies(request: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest): Promise; - } - - namespace PolicyTagManagerSerialization { - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization|importTaxonomies}. - * @param error Error, if any - * @param [response] ImportTaxonomiesResponse - */ - type ImportTaxonomiesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse) => void; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization|exportTaxonomies}. - * @param error Error, if any - * @param [response] ExportTaxonomiesResponse - */ - type ExportTaxonomiesCallback = (error: (Error|null), response?: google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse) => void; - } - - /** Properties of a SerializedTaxonomy. */ - interface ISerializedTaxonomy { - - /** SerializedTaxonomy displayName */ - displayName?: (string|null); - - /** SerializedTaxonomy description */ - description?: (string|null); - - /** SerializedTaxonomy policyTags */ - policyTags?: (google.cloud.datacatalog.v1beta1.ISerializedPolicyTag[]|null); - } - - /** Represents a SerializedTaxonomy. */ - class SerializedTaxonomy implements ISerializedTaxonomy { - - /** - * Constructs a new SerializedTaxonomy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy); - - /** SerializedTaxonomy displayName. */ - public displayName: string; - - /** SerializedTaxonomy description. */ - public description: string; - - /** SerializedTaxonomy policyTags. */ - public policyTags: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag[]; - - /** - * Creates a new SerializedTaxonomy instance using the specified properties. - * @param [properties] Properties to set - * @returns SerializedTaxonomy instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy): google.cloud.datacatalog.v1beta1.SerializedTaxonomy; - - /** - * Encodes the specified SerializedTaxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify|verify} messages. - * @param message SerializedTaxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SerializedTaxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify|verify} messages. - * @param message SerializedTaxonomy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SerializedTaxonomy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SerializedTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SerializedTaxonomy; - - /** - * Decodes a SerializedTaxonomy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SerializedTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SerializedTaxonomy; - - /** - * Verifies a SerializedTaxonomy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SerializedTaxonomy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SerializedTaxonomy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SerializedTaxonomy; - - /** - * Creates a plain object from a SerializedTaxonomy message. Also converts values to other types if specified. - * @param message SerializedTaxonomy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SerializedTaxonomy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SerializedTaxonomy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SerializedTaxonomy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SerializedPolicyTag. */ - interface ISerializedPolicyTag { - - /** SerializedPolicyTag displayName */ - displayName?: (string|null); - - /** SerializedPolicyTag description */ - description?: (string|null); - - /** SerializedPolicyTag childPolicyTags */ - childPolicyTags?: (google.cloud.datacatalog.v1beta1.ISerializedPolicyTag[]|null); - } - - /** Represents a SerializedPolicyTag. */ - class SerializedPolicyTag implements ISerializedPolicyTag { - - /** - * Constructs a new SerializedPolicyTag. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag); - - /** SerializedPolicyTag displayName. */ - public displayName: string; - - /** SerializedPolicyTag description. */ - public description: string; - - /** SerializedPolicyTag childPolicyTags. */ - public childPolicyTags: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag[]; - - /** - * Creates a new SerializedPolicyTag instance using the specified properties. - * @param [properties] Properties to set - * @returns SerializedPolicyTag instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag): google.cloud.datacatalog.v1beta1.SerializedPolicyTag; - - /** - * Encodes the specified SerializedPolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify|verify} messages. - * @param message SerializedPolicyTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SerializedPolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify|verify} messages. - * @param message SerializedPolicyTag message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.ISerializedPolicyTag, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SerializedPolicyTag message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SerializedPolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.SerializedPolicyTag; - - /** - * Decodes a SerializedPolicyTag message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SerializedPolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.SerializedPolicyTag; - - /** - * Verifies a SerializedPolicyTag message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SerializedPolicyTag message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SerializedPolicyTag - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.SerializedPolicyTag; - - /** - * Creates a plain object from a SerializedPolicyTag message. Also converts values to other types if specified. - * @param message SerializedPolicyTag - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.SerializedPolicyTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SerializedPolicyTag to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SerializedPolicyTag - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportTaxonomiesRequest. */ - interface IImportTaxonomiesRequest { - - /** ImportTaxonomiesRequest parent */ - parent?: (string|null); - - /** ImportTaxonomiesRequest inlineSource */ - inlineSource?: (google.cloud.datacatalog.v1beta1.IInlineSource|null); - } - - /** Represents an ImportTaxonomiesRequest. */ - class ImportTaxonomiesRequest implements IImportTaxonomiesRequest { - - /** - * Constructs a new ImportTaxonomiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest); - - /** ImportTaxonomiesRequest parent. */ - public parent: string; - - /** ImportTaxonomiesRequest inlineSource. */ - public inlineSource?: (google.cloud.datacatalog.v1beta1.IInlineSource|null); - - /** ImportTaxonomiesRequest source. */ - public source?: "inlineSource"; - - /** - * Creates a new ImportTaxonomiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportTaxonomiesRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest): google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest; - - /** - * Encodes the specified ImportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.verify|verify} messages. - * @param message ImportTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.verify|verify} messages. - * @param message ImportTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest; - - /** - * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest; - - /** - * Verifies an ImportTaxonomiesRequest message. - * @param message Plain 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 ImportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportTaxonomiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest; - - /** - * Creates a plain object from an ImportTaxonomiesRequest message. Also converts values to other types if specified. - * @param message ImportTaxonomiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportTaxonomiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportTaxonomiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InlineSource. */ - interface IInlineSource { - - /** InlineSource taxonomies */ - taxonomies?: (google.cloud.datacatalog.v1beta1.ISerializedTaxonomy[]|null); - } - - /** Represents an InlineSource. */ - class InlineSource implements IInlineSource { - - /** - * Constructs a new InlineSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IInlineSource); - - /** InlineSource taxonomies. */ - public taxonomies: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy[]; - - /** - * Creates a new InlineSource instance using the specified properties. - * @param [properties] Properties to set - * @returns InlineSource instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IInlineSource): google.cloud.datacatalog.v1beta1.InlineSource; - - /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.InlineSource.verify|verify} messages. - * @param message InlineSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.InlineSource.verify|verify} messages. - * @param message InlineSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InlineSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.InlineSource; - - /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.InlineSource; - - /** - * Verifies an InlineSource message. - * @param message Plain 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 InlineSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InlineSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.InlineSource; - - /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @param message InlineSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InlineSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InlineSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImportTaxonomiesResponse. */ - interface IImportTaxonomiesResponse { - - /** ImportTaxonomiesResponse taxonomies */ - taxonomies?: (google.cloud.datacatalog.v1beta1.ITaxonomy[]|null); - } - - /** Represents an ImportTaxonomiesResponse. */ - class ImportTaxonomiesResponse implements IImportTaxonomiesResponse { - - /** - * Constructs a new ImportTaxonomiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse); - - /** ImportTaxonomiesResponse taxonomies. */ - public taxonomies: google.cloud.datacatalog.v1beta1.ITaxonomy[]; - - /** - * Creates a new ImportTaxonomiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportTaxonomiesResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse): google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse; - - /** - * Encodes the specified ImportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.verify|verify} messages. - * @param message ImportTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.verify|verify} messages. - * @param message ImportTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse; - - /** - * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse; - - /** - * Verifies an ImportTaxonomiesResponse message. - * @param message Plain 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 ImportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportTaxonomiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse; - - /** - * Creates a plain object from an ImportTaxonomiesResponse message. Also converts values to other types if specified. - * @param message ImportTaxonomiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportTaxonomiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportTaxonomiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportTaxonomiesRequest. */ - interface IExportTaxonomiesRequest { - - /** ExportTaxonomiesRequest parent */ - parent?: (string|null); - - /** ExportTaxonomiesRequest taxonomies */ - taxonomies?: (string[]|null); - - /** ExportTaxonomiesRequest serializedTaxonomies */ - serializedTaxonomies?: (boolean|null); - } - - /** Represents an ExportTaxonomiesRequest. */ - class ExportTaxonomiesRequest implements IExportTaxonomiesRequest { - - /** - * Constructs a new ExportTaxonomiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest); - - /** ExportTaxonomiesRequest parent. */ - public parent: string; - - /** ExportTaxonomiesRequest taxonomies. */ - public taxonomies: string[]; - - /** ExportTaxonomiesRequest serializedTaxonomies. */ - public serializedTaxonomies?: (boolean|null); - - /** ExportTaxonomiesRequest destination. */ - public destination?: "serializedTaxonomies"; - - /** - * Creates a new ExportTaxonomiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportTaxonomiesRequest instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest): google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest; - - /** - * Encodes the specified ExportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.verify|verify} messages. - * @param message ExportTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.verify|verify} messages. - * @param message ExportTaxonomiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest; - - /** - * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest; - - /** - * Verifies an ExportTaxonomiesRequest message. - * @param message Plain 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 ExportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportTaxonomiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest; - - /** - * Creates a plain object from an ExportTaxonomiesRequest message. Also converts values to other types if specified. - * @param message ExportTaxonomiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportTaxonomiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportTaxonomiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExportTaxonomiesResponse. */ - interface IExportTaxonomiesResponse { - - /** ExportTaxonomiesResponse taxonomies */ - taxonomies?: (google.cloud.datacatalog.v1beta1.ISerializedTaxonomy[]|null); - } - - /** Represents an ExportTaxonomiesResponse. */ - class ExportTaxonomiesResponse implements IExportTaxonomiesResponse { - - /** - * Constructs a new ExportTaxonomiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse); - - /** ExportTaxonomiesResponse taxonomies. */ - public taxonomies: google.cloud.datacatalog.v1beta1.ISerializedTaxonomy[]; - - /** - * Creates a new ExportTaxonomiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExportTaxonomiesResponse instance - */ - public static create(properties?: google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse): google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse; - - /** - * Encodes the specified ExportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.verify|verify} messages. - * @param message ExportTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.verify|verify} messages. - * @param message ExportTaxonomiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse; - - /** - * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse; - - /** - * Verifies an ExportTaxonomiesResponse message. - * @param message Plain 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 ExportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportTaxonomiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse; - - /** - * Creates a plain object from an ExportTaxonomiesResponse message. Also converts values to other types if specified. - * @param message ExportTaxonomiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportTaxonomiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExportTaxonomiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 - } - - /** 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 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; - } - - /** 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?: (string|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: string; - - /** - * 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); - } - - /** 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[]; - - /** - * 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; - } - - /** 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_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } - - /** 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 phpGenericServices */ - phpGenericServices?: (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 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 phpGenericServices. */ - public phpGenericServices: 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 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 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 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 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 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 - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** 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 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 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 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 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 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 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); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** 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 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); - } - - /** 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 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 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 Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace iam. */ - namespace iam { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a IAMPolicy */ - class IAMPolicy extends $protobuf.rpc.Service { - - /** - * Constructs a new IAMPolicy 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 IAMPolicy 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): IAMPolicy; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace IAMPolicy { - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a SetIamPolicyRequest. */ - interface ISetIamPolicyRequest { - - /** SetIamPolicyRequest resource */ - resource?: (string|null); - - /** SetIamPolicyRequest policy */ - policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a SetIamPolicyRequest. */ - class SetIamPolicyRequest implements ISetIamPolicyRequest { - - /** - * Constructs a new SetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ISetIamPolicyRequest); - - /** SetIamPolicyRequest resource. */ - public resource: string; - - /** SetIamPolicyRequest policy. */ - public policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; - - /** - * Verifies a SetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @param message SetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetIamPolicyRequest. */ - interface IGetIamPolicyRequest { - - /** GetIamPolicyRequest resource */ - resource?: (string|null); - - /** GetIamPolicyRequest options */ - options?: (google.iam.v1.IGetPolicyOptions|null); - } - - /** Represents a GetIamPolicyRequest. */ - class GetIamPolicyRequest implements IGetIamPolicyRequest { - - /** - * Constructs a new GetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetIamPolicyRequest); - - /** GetIamPolicyRequest resource. */ - public resource: string; - - /** GetIamPolicyRequest options. */ - public options?: (google.iam.v1.IGetPolicyOptions|null); - - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; - - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; - - /** - * Verifies a GetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; - - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @param message GetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TestIamPermissionsRequest. */ - interface ITestIamPermissionsRequest { - - /** TestIamPermissionsRequest resource */ - resource?: (string|null); - - /** TestIamPermissionsRequest permissions */ - permissions?: (string[]|null); - } - - /** Represents a TestIamPermissionsRequest. */ - class TestIamPermissionsRequest implements ITestIamPermissionsRequest { - - /** - * Constructs a new TestIamPermissionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); - - /** TestIamPermissionsRequest resource. */ - public resource: string; - - /** TestIamPermissionsRequest permissions. */ - public permissions: string[]; - - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsRequest instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; - - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; - - /** - * Verifies a TestIamPermissionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; - - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @param message TestIamPermissionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TestIamPermissionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TestIamPermissionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TestIamPermissionsResponse. */ - interface ITestIamPermissionsResponse { - - /** TestIamPermissionsResponse permissions */ - permissions?: (string[]|null); - } - - /** Represents a TestIamPermissionsResponse. */ - class TestIamPermissionsResponse implements ITestIamPermissionsResponse { - - /** - * Constructs a new TestIamPermissionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); - - /** TestIamPermissionsResponse permissions. */ - public permissions: string[]; - - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsResponse instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; - - /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; - - /** - * Verifies a TestIamPermissionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; - - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @param message TestIamPermissionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TestIamPermissionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TestIamPermissionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPolicyOptions. */ - interface IGetPolicyOptions { - - /** GetPolicyOptions requestedPolicyVersion */ - requestedPolicyVersion?: (number|null); - } - - /** Represents a GetPolicyOptions. */ - class GetPolicyOptions implements IGetPolicyOptions { - - /** - * Constructs a new GetPolicyOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetPolicyOptions); - - /** GetPolicyOptions requestedPolicyVersion. */ - public requestedPolicyVersion: number; - - /** - * Creates a new GetPolicyOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPolicyOptions instance - */ - public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; - - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; - - /** - * Verifies a GetPolicyOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPolicyOptions - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; - - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @param message GetPolicyOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPolicyOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPolicyOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Policy. */ - interface IPolicy { - - /** Policy version */ - version?: (number|null); - - /** Policy bindings */ - bindings?: (google.iam.v1.IBinding[]|null); - - /** Policy auditConfigs */ - auditConfigs?: (google.iam.v1.IAuditConfig[]|null); - - /** Policy etag */ - etag?: (Uint8Array|string|null); - } - - /** Represents a Policy. */ - class Policy implements IPolicy { - - /** - * Constructs a new Policy. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicy); - - /** Policy version. */ - public version: number; - - /** Policy bindings. */ - public bindings: google.iam.v1.IBinding[]; - - /** Policy auditConfigs. */ - public auditConfigs: google.iam.v1.IAuditConfig[]; - - /** Policy etag. */ - public etag: (Uint8Array|string); - - /** - * Creates a new Policy instance using the specified properties. - * @param [properties] Properties to set - * @returns Policy instance - */ - public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; - - /** - * Verifies a Policy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Policy - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @param message Policy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Policy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Policy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Binding. */ - interface IBinding { - - /** Binding role */ - role?: (string|null); - - /** Binding members */ - members?: (string[]|null); - - /** Binding condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a Binding. */ - class Binding implements IBinding { - - /** - * Constructs a new Binding. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBinding); - - /** Binding role. */ - public role: string; - - /** Binding members. */ - public members: string[]; - - /** Binding condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new Binding instance using the specified properties. - * @param [properties] Properties to set - * @returns Binding instance - */ - public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; - - /** - * Verifies a Binding message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Binding - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @param message Binding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Binding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Binding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditConfig. */ - interface IAuditConfig { - - /** AuditConfig service */ - service?: (string|null); - - /** AuditConfig auditLogConfigs */ - auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); - } - - /** Represents an AuditConfig. */ - class AuditConfig implements IAuditConfig { - - /** - * Constructs a new AuditConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfig); - - /** AuditConfig service. */ - public service: string; - - /** AuditConfig auditLogConfigs. */ - public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfig instance - */ - public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; - - /** - * Verifies an AuditConfig message. - * @param message Plain 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 AuditConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @param message AuditConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditLogConfig. */ - interface IAuditLogConfig { - - /** AuditLogConfig logType */ - logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); - - /** AuditLogConfig exemptedMembers */ - exemptedMembers?: (string[]|null); - } - - /** Represents an AuditLogConfig. */ - class AuditLogConfig implements IAuditLogConfig { - - /** - * Constructs a new AuditLogConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditLogConfig); - - /** AuditLogConfig logType. */ - public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); - - /** AuditLogConfig exemptedMembers. */ - public exemptedMembers: string[]; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditLogConfig instance - */ - public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; - - /** - * Verifies an AuditLogConfig message. - * @param message Plain 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 AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditLogConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @param message AuditLogConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditLogConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditLogConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditLogConfig { - - /** LogType enum. */ - enum LogType { - LOG_TYPE_UNSPECIFIED = 0, - ADMIN_READ = 1, - DATA_WRITE = 2, - DATA_READ = 3 - } - } - - /** Properties of a PolicyDelta. */ - interface IPolicyDelta { - - /** PolicyDelta bindingDeltas */ - bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); - - /** PolicyDelta auditConfigDeltas */ - auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); - } - - /** Represents a PolicyDelta. */ - class PolicyDelta implements IPolicyDelta { - - /** - * Constructs a new PolicyDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicyDelta); - - /** PolicyDelta bindingDeltas. */ - public bindingDeltas: google.iam.v1.IBindingDelta[]; - - /** PolicyDelta auditConfigDeltas. */ - public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyDelta instance - */ - public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; - - /** - * Verifies a PolicyDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @param message PolicyDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PolicyDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PolicyDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BindingDelta. */ - interface IBindingDelta { - - /** BindingDelta action */ - action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); - - /** BindingDelta role */ - role?: (string|null); - - /** BindingDelta member */ - member?: (string|null); - - /** BindingDelta condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a BindingDelta. */ - class BindingDelta implements IBindingDelta { - - /** - * Constructs a new BindingDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBindingDelta); - - /** BindingDelta action. */ - public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); - - /** BindingDelta role. */ - public role: string; - - /** BindingDelta member. */ - public member: string; - - /** BindingDelta condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new BindingDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns BindingDelta instance - */ - public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; - - /** - * Verifies a BindingDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BindingDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @param message BindingDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BindingDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BindingDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BindingDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - - /** Properties of an AuditConfigDelta. */ - interface IAuditConfigDelta { - - /** AuditConfigDelta action */ - action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); - - /** AuditConfigDelta service */ - service?: (string|null); - - /** AuditConfigDelta exemptedMember */ - exemptedMember?: (string|null); - - /** AuditConfigDelta logType */ - logType?: (string|null); - } - - /** Represents an AuditConfigDelta. */ - class AuditConfigDelta implements IAuditConfigDelta { - - /** - * Constructs a new AuditConfigDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfigDelta); - - /** AuditConfigDelta action. */ - public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); - - /** AuditConfigDelta service. */ - public service: string; - - /** AuditConfigDelta exemptedMember. */ - public exemptedMember: string; - - /** AuditConfigDelta logType. */ - public logType: string; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfigDelta instance - */ - public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; - - /** - * Verifies an AuditConfigDelta message. - * @param message Plain 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 AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfigDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @param message AuditConfigDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfigDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfigDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditConfigDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of an Expr. */ - interface IExpr { - - /** Expr expression */ - expression?: (string|null); - - /** Expr title */ - title?: (string|null); - - /** Expr description */ - description?: (string|null); - - /** Expr location */ - location?: (string|null); - } - - /** Represents an Expr. */ - class Expr implements IExpr { - - /** - * Constructs a new Expr. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IExpr); - - /** Expr expression. */ - public expression: string; - - /** Expr title. */ - public title: string; - - /** Expr description. */ - public description: string; - - /** Expr location. */ - public location: string; - - /** - * Creates a new Expr instance using the specified properties. - * @param [properties] Properties to set - * @returns Expr instance - */ - public static create(properties?: google.type.IExpr): google.type.Expr; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Expr - * @throws {Error} If the payload is not 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.Expr; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Expr - * @throws {Error} If the payload 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.Expr; - - /** - * Verifies an Expr message. - * @param message Plain 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 Expr message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Expr - */ - public static fromObject(object: { [k: string]: any }): google.type.Expr; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @param message Expr - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Expr to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Expr - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/protos/protos.js b/protos/protos.js deleted file mode 100644 index cc86d70c..00000000 --- a/protos/protos.js +++ /dev/null @@ -1,64724 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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_datacatalog_protos || ($protobuf.roots._google_cloud_datacatalog_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.datacatalog = (function() { - - /** - * Namespace datacatalog. - * @memberof google.cloud - * @namespace - */ - var datacatalog = {}; - - datacatalog.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.datacatalog - * @namespace - */ - var v1 = {}; - - v1.BigQueryConnectionSpec = (function() { - - /** - * Properties of a BigQueryConnectionSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IBigQueryConnectionSpec - * @property {google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType|null} [connectionType] BigQueryConnectionSpec connectionType - * @property {google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec|null} [cloudSql] BigQueryConnectionSpec cloudSql - * @property {boolean|null} [hasCredential] BigQueryConnectionSpec hasCredential - */ - - /** - * Constructs a new BigQueryConnectionSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a BigQueryConnectionSpec. - * @implements IBigQueryConnectionSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IBigQueryConnectionSpec=} [properties] Properties to set - */ - function BigQueryConnectionSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryConnectionSpec connectionType. - * @member {google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType} connectionType - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @instance - */ - BigQueryConnectionSpec.prototype.connectionType = 0; - - /** - * BigQueryConnectionSpec cloudSql. - * @member {google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec|null|undefined} cloudSql - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @instance - */ - BigQueryConnectionSpec.prototype.cloudSql = null; - - /** - * BigQueryConnectionSpec hasCredential. - * @member {boolean} hasCredential - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @instance - */ - BigQueryConnectionSpec.prototype.hasCredential = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BigQueryConnectionSpec connectionSpec. - * @member {"cloudSql"|undefined} connectionSpec - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @instance - */ - Object.defineProperty(BigQueryConnectionSpec.prototype, "connectionSpec", { - get: $util.oneOfGetter($oneOfFields = ["cloudSql"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BigQueryConnectionSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryConnectionSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.BigQueryConnectionSpec} BigQueryConnectionSpec instance - */ - BigQueryConnectionSpec.create = function create(properties) { - return new BigQueryConnectionSpec(properties); - }; - - /** - * Encodes the specified BigQueryConnectionSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryConnectionSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryConnectionSpec} message BigQueryConnectionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryConnectionSpec.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); - if (message.cloudSql != null && Object.hasOwnProperty.call(message, "cloudSql")) - $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.encode(message.cloudSql, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.hasCredential != null && Object.hasOwnProperty.call(message, "hasCredential")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.hasCredential); - return writer; - }; - - /** - * Encodes the specified BigQueryConnectionSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryConnectionSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryConnectionSpec} message BigQueryConnectionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryConnectionSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryConnectionSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.BigQueryConnectionSpec} BigQueryConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryConnectionSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.connectionType = reader.int32(); - break; - } - case 2: { - message.cloudSql = $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.decode(reader, reader.uint32()); - break; - } - case 3: { - message.hasCredential = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryConnectionSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.BigQueryConnectionSpec} BigQueryConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryConnectionSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryConnectionSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryConnectionSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.connectionType != null && message.hasOwnProperty("connectionType")) - switch (message.connectionType) { - default: - return "connectionType: enum value expected"; - case 0: - case 1: - break; - } - if (message.cloudSql != null && message.hasOwnProperty("cloudSql")) { - properties.connectionSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.verify(message.cloudSql); - if (error) - return "cloudSql." + error; - } - } - if (message.hasCredential != null && message.hasOwnProperty("hasCredential")) - if (typeof message.hasCredential !== "boolean") - return "hasCredential: boolean expected"; - return null; - }; - - /** - * Creates a BigQueryConnectionSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.BigQueryConnectionSpec} BigQueryConnectionSpec - */ - BigQueryConnectionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec(); - 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 "CLOUD_SQL": - case 1: - message.connectionType = 1; - break; - } - if (object.cloudSql != null) { - if (typeof object.cloudSql !== "object") - throw TypeError(".google.cloud.datacatalog.v1.BigQueryConnectionSpec.cloudSql: object expected"); - message.cloudSql = $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.fromObject(object.cloudSql); - } - if (object.hasCredential != null) - message.hasCredential = Boolean(object.hasCredential); - return message; - }; - - /** - * Creates a plain object from a BigQueryConnectionSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.BigQueryConnectionSpec} message BigQueryConnectionSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryConnectionSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.connectionType = options.enums === String ? "CONNECTION_TYPE_UNSPECIFIED" : 0; - object.hasCredential = false; - } - if (message.connectionType != null && message.hasOwnProperty("connectionType")) - object.connectionType = options.enums === String ? $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType[message.connectionType] === undefined ? message.connectionType : $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType[message.connectionType] : message.connectionType; - if (message.cloudSql != null && message.hasOwnProperty("cloudSql")) { - object.cloudSql = $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.toObject(message.cloudSql, options); - if (options.oneofs) - object.connectionSpec = "cloudSql"; - } - if (message.hasCredential != null && message.hasOwnProperty("hasCredential")) - object.hasCredential = message.hasCredential; - return object; - }; - - /** - * Converts this BigQueryConnectionSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @instance - * @returns {Object.} JSON object - */ - BigQueryConnectionSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryConnectionSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.BigQueryConnectionSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryConnectionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.BigQueryConnectionSpec"; - }; - - /** - * ConnectionType enum. - * @name google.cloud.datacatalog.v1.BigQueryConnectionSpec.ConnectionType - * @enum {number} - * @property {number} CONNECTION_TYPE_UNSPECIFIED=0 CONNECTION_TYPE_UNSPECIFIED value - * @property {number} CLOUD_SQL=1 CLOUD_SQL value - */ - BigQueryConnectionSpec.ConnectionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONNECTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_SQL"] = 1; - return values; - })(); - - return BigQueryConnectionSpec; - })(); - - v1.CloudSqlBigQueryConnectionSpec = (function() { - - /** - * Properties of a CloudSqlBigQueryConnectionSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface ICloudSqlBigQueryConnectionSpec - * @property {string|null} [instanceId] CloudSqlBigQueryConnectionSpec instanceId - * @property {string|null} [database] CloudSqlBigQueryConnectionSpec database - * @property {google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType|null} [type] CloudSqlBigQueryConnectionSpec type - */ - - /** - * Constructs a new CloudSqlBigQueryConnectionSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CloudSqlBigQueryConnectionSpec. - * @implements ICloudSqlBigQueryConnectionSpec - * @constructor - * @param {google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec=} [properties] Properties to set - */ - function CloudSqlBigQueryConnectionSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudSqlBigQueryConnectionSpec instanceId. - * @member {string} instanceId - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @instance - */ - CloudSqlBigQueryConnectionSpec.prototype.instanceId = ""; - - /** - * CloudSqlBigQueryConnectionSpec database. - * @member {string} database - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @instance - */ - CloudSqlBigQueryConnectionSpec.prototype.database = ""; - - /** - * CloudSqlBigQueryConnectionSpec type. - * @member {google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType} type - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @instance - */ - CloudSqlBigQueryConnectionSpec.prototype.type = 0; - - /** - * Creates a new CloudSqlBigQueryConnectionSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec} CloudSqlBigQueryConnectionSpec instance - */ - CloudSqlBigQueryConnectionSpec.create = function create(properties) { - return new CloudSqlBigQueryConnectionSpec(properties); - }; - - /** - * Encodes the specified CloudSqlBigQueryConnectionSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec} message CloudSqlBigQueryConnectionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSqlBigQueryConnectionSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.instanceId != null && Object.hasOwnProperty.call(message, "instanceId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.instanceId); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.database); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - return writer; - }; - - /** - * Encodes the specified CloudSqlBigQueryConnectionSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.ICloudSqlBigQueryConnectionSpec} message CloudSqlBigQueryConnectionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSqlBigQueryConnectionSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudSqlBigQueryConnectionSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec} CloudSqlBigQueryConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSqlBigQueryConnectionSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.instanceId = reader.string(); - break; - } - case 2: { - message.database = reader.string(); - break; - } - case 3: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudSqlBigQueryConnectionSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec} CloudSqlBigQueryConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSqlBigQueryConnectionSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudSqlBigQueryConnectionSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudSqlBigQueryConnectionSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - if (!$util.isString(message.instanceId)) - return "instanceId: string expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a CloudSqlBigQueryConnectionSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec} CloudSqlBigQueryConnectionSpec - */ - CloudSqlBigQueryConnectionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec(); - if (object.instanceId != null) - message.instanceId = String(object.instanceId); - if (object.database != null) - message.database = String(object.database); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "DATABASE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "POSTGRES": - case 1: - message.type = 1; - break; - case "MYSQL": - case 2: - message.type = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a CloudSqlBigQueryConnectionSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec} message CloudSqlBigQueryConnectionSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudSqlBigQueryConnectionSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.instanceId = ""; - object.database = ""; - object.type = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; - } - if (message.instanceId != null && message.hasOwnProperty("instanceId")) - object.instanceId = message.instanceId; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType[message.type] === undefined ? message.type : $root.google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType[message.type] : message.type; - return object; - }; - - /** - * Converts this CloudSqlBigQueryConnectionSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @instance - * @returns {Object.} JSON object - */ - CloudSqlBigQueryConnectionSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudSqlBigQueryConnectionSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudSqlBigQueryConnectionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec"; - }; - - /** - * DatabaseType enum. - * @name google.cloud.datacatalog.v1.CloudSqlBigQueryConnectionSpec.DatabaseType - * @enum {number} - * @property {number} DATABASE_TYPE_UNSPECIFIED=0 DATABASE_TYPE_UNSPECIFIED value - * @property {number} POSTGRES=1 POSTGRES value - * @property {number} MYSQL=2 MYSQL value - */ - CloudSqlBigQueryConnectionSpec.DatabaseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "POSTGRES"] = 1; - values[valuesById[2] = "MYSQL"] = 2; - return values; - })(); - - return CloudSqlBigQueryConnectionSpec; - })(); - - v1.BigQueryRoutineSpec = (function() { - - /** - * Properties of a BigQueryRoutineSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IBigQueryRoutineSpec - * @property {Array.|null} [importedLibraries] BigQueryRoutineSpec importedLibraries - */ - - /** - * Constructs a new BigQueryRoutineSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a BigQueryRoutineSpec. - * @implements IBigQueryRoutineSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IBigQueryRoutineSpec=} [properties] Properties to set - */ - function BigQueryRoutineSpec(properties) { - this.importedLibraries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryRoutineSpec importedLibraries. - * @member {Array.} importedLibraries - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @instance - */ - BigQueryRoutineSpec.prototype.importedLibraries = $util.emptyArray; - - /** - * Creates a new BigQueryRoutineSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryRoutineSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.BigQueryRoutineSpec} BigQueryRoutineSpec instance - */ - BigQueryRoutineSpec.create = function create(properties) { - return new BigQueryRoutineSpec(properties); - }; - - /** - * Encodes the specified BigQueryRoutineSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryRoutineSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryRoutineSpec} message BigQueryRoutineSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryRoutineSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.importedLibraries != null && message.importedLibraries.length) - for (var i = 0; i < message.importedLibraries.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.importedLibraries[i]); - return writer; - }; - - /** - * Encodes the specified BigQueryRoutineSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryRoutineSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryRoutineSpec} message BigQueryRoutineSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryRoutineSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryRoutineSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.BigQueryRoutineSpec} BigQueryRoutineSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryRoutineSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.BigQueryRoutineSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.importedLibraries && message.importedLibraries.length)) - message.importedLibraries = []; - message.importedLibraries.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryRoutineSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.BigQueryRoutineSpec} BigQueryRoutineSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryRoutineSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryRoutineSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryRoutineSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.importedLibraries != null && message.hasOwnProperty("importedLibraries")) { - if (!Array.isArray(message.importedLibraries)) - return "importedLibraries: array expected"; - for (var i = 0; i < message.importedLibraries.length; ++i) - if (!$util.isString(message.importedLibraries[i])) - return "importedLibraries: string[] expected"; - } - return null; - }; - - /** - * Creates a BigQueryRoutineSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.BigQueryRoutineSpec} BigQueryRoutineSpec - */ - BigQueryRoutineSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.BigQueryRoutineSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.BigQueryRoutineSpec(); - if (object.importedLibraries) { - if (!Array.isArray(object.importedLibraries)) - throw TypeError(".google.cloud.datacatalog.v1.BigQueryRoutineSpec.importedLibraries: array expected"); - message.importedLibraries = []; - for (var i = 0; i < object.importedLibraries.length; ++i) - message.importedLibraries[i] = String(object.importedLibraries[i]); - } - return message; - }; - - /** - * Creates a plain object from a BigQueryRoutineSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @static - * @param {google.cloud.datacatalog.v1.BigQueryRoutineSpec} message BigQueryRoutineSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryRoutineSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.importedLibraries = []; - if (message.importedLibraries && message.importedLibraries.length) { - object.importedLibraries = []; - for (var j = 0; j < message.importedLibraries.length; ++j) - object.importedLibraries[j] = message.importedLibraries[j]; - } - return object; - }; - - /** - * Converts this BigQueryRoutineSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @instance - * @returns {Object.} JSON object - */ - BigQueryRoutineSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryRoutineSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.BigQueryRoutineSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryRoutineSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.BigQueryRoutineSpec"; - }; - - return BigQueryRoutineSpec; - })(); - - v1.PersonalDetails = (function() { - - /** - * Properties of a PersonalDetails. - * @memberof google.cloud.datacatalog.v1 - * @interface IPersonalDetails - * @property {boolean|null} [starred] PersonalDetails starred - * @property {google.protobuf.ITimestamp|null} [starTime] PersonalDetails starTime - */ - - /** - * Constructs a new PersonalDetails. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a PersonalDetails. - * @implements IPersonalDetails - * @constructor - * @param {google.cloud.datacatalog.v1.IPersonalDetails=} [properties] Properties to set - */ - function PersonalDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PersonalDetails starred. - * @member {boolean} starred - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @instance - */ - PersonalDetails.prototype.starred = false; - - /** - * PersonalDetails starTime. - * @member {google.protobuf.ITimestamp|null|undefined} starTime - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @instance - */ - PersonalDetails.prototype.starTime = null; - - /** - * Creates a new PersonalDetails instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @static - * @param {google.cloud.datacatalog.v1.IPersonalDetails=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.PersonalDetails} PersonalDetails instance - */ - PersonalDetails.create = function create(properties) { - return new PersonalDetails(properties); - }; - - /** - * Encodes the specified PersonalDetails message. Does not implicitly {@link google.cloud.datacatalog.v1.PersonalDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @static - * @param {google.cloud.datacatalog.v1.IPersonalDetails} message PersonalDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PersonalDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.starred != null && Object.hasOwnProperty.call(message, "starred")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.starred); - if (message.starTime != null && Object.hasOwnProperty.call(message, "starTime")) - $root.google.protobuf.Timestamp.encode(message.starTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PersonalDetails message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PersonalDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @static - * @param {google.cloud.datacatalog.v1.IPersonalDetails} message PersonalDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PersonalDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PersonalDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.PersonalDetails} PersonalDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PersonalDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.PersonalDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.starred = reader.bool(); - break; - } - case 2: { - message.starTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PersonalDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.PersonalDetails} PersonalDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PersonalDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PersonalDetails message. - * @function verify - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PersonalDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.starred != null && message.hasOwnProperty("starred")) - if (typeof message.starred !== "boolean") - return "starred: boolean expected"; - if (message.starTime != null && message.hasOwnProperty("starTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.starTime); - if (error) - return "starTime." + error; - } - return null; - }; - - /** - * Creates a PersonalDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.PersonalDetails} PersonalDetails - */ - PersonalDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.PersonalDetails) - return object; - var message = new $root.google.cloud.datacatalog.v1.PersonalDetails(); - if (object.starred != null) - message.starred = Boolean(object.starred); - if (object.starTime != null) { - if (typeof object.starTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1.PersonalDetails.starTime: object expected"); - message.starTime = $root.google.protobuf.Timestamp.fromObject(object.starTime); - } - return message; - }; - - /** - * Creates a plain object from a PersonalDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @static - * @param {google.cloud.datacatalog.v1.PersonalDetails} message PersonalDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PersonalDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.starred = false; - object.starTime = null; - } - if (message.starred != null && message.hasOwnProperty("starred")) - object.starred = message.starred; - if (message.starTime != null && message.hasOwnProperty("starTime")) - object.starTime = $root.google.protobuf.Timestamp.toObject(message.starTime, options); - return object; - }; - - /** - * Converts this PersonalDetails to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @instance - * @returns {Object.} JSON object - */ - PersonalDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PersonalDetails - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.PersonalDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PersonalDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.PersonalDetails"; - }; - - return PersonalDetails; - })(); - - /** - * IntegratedSystem enum. - * @name google.cloud.datacatalog.v1.IntegratedSystem - * @enum {number} - * @property {number} INTEGRATED_SYSTEM_UNSPECIFIED=0 INTEGRATED_SYSTEM_UNSPECIFIED value - * @property {number} BIGQUERY=1 BIGQUERY value - * @property {number} CLOUD_PUBSUB=2 CLOUD_PUBSUB value - * @property {number} DATAPROC_METASTORE=3 DATAPROC_METASTORE value - * @property {number} DATAPLEX=4 DATAPLEX value - */ - v1.IntegratedSystem = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTEGRATED_SYSTEM_UNSPECIFIED"] = 0; - values[valuesById[1] = "BIGQUERY"] = 1; - values[valuesById[2] = "CLOUD_PUBSUB"] = 2; - values[valuesById[3] = "DATAPROC_METASTORE"] = 3; - values[valuesById[4] = "DATAPLEX"] = 4; - return values; - })(); - - v1.DataSource = (function() { - - /** - * Properties of a DataSource. - * @memberof google.cloud.datacatalog.v1 - * @interface IDataSource - * @property {google.cloud.datacatalog.v1.DataSource.Service|null} [service] DataSource service - * @property {string|null} [resource] DataSource resource - * @property {string|null} [sourceEntry] DataSource sourceEntry - * @property {google.cloud.datacatalog.v1.IStorageProperties|null} [storageProperties] DataSource storageProperties - */ - - /** - * Constructs a new DataSource. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DataSource. - * @implements IDataSource - * @constructor - * @param {google.cloud.datacatalog.v1.IDataSource=} [properties] Properties to set - */ - function DataSource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataSource service. - * @member {google.cloud.datacatalog.v1.DataSource.Service} service - * @memberof google.cloud.datacatalog.v1.DataSource - * @instance - */ - DataSource.prototype.service = 0; - - /** - * DataSource resource. - * @member {string} resource - * @memberof google.cloud.datacatalog.v1.DataSource - * @instance - */ - DataSource.prototype.resource = ""; - - /** - * DataSource sourceEntry. - * @member {string} sourceEntry - * @memberof google.cloud.datacatalog.v1.DataSource - * @instance - */ - DataSource.prototype.sourceEntry = ""; - - /** - * DataSource storageProperties. - * @member {google.cloud.datacatalog.v1.IStorageProperties|null|undefined} storageProperties - * @memberof google.cloud.datacatalog.v1.DataSource - * @instance - */ - DataSource.prototype.storageProperties = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataSource properties. - * @member {"storageProperties"|undefined} properties - * @memberof google.cloud.datacatalog.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "properties", { - get: $util.oneOfGetter($oneOfFields = ["storageProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataSource instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DataSource - * @static - * @param {google.cloud.datacatalog.v1.IDataSource=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DataSource} DataSource instance - */ - DataSource.create = function create(properties) { - return new DataSource(properties); - }; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.datacatalog.v1.DataSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DataSource - * @static - * @param {google.cloud.datacatalog.v1.IDataSource} message DataSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.service); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resource); - if (message.sourceEntry != null && Object.hasOwnProperty.call(message, "sourceEntry")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceEntry); - if (message.storageProperties != null && Object.hasOwnProperty.call(message, "storageProperties")) - $root.google.cloud.datacatalog.v1.StorageProperties.encode(message.storageProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DataSource - * @static - * @param {google.cloud.datacatalog.v1.IDataSource} message DataSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DataSource} DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DataSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.service = reader.int32(); - break; - } - case 2: { - message.resource = reader.string(); - break; - } - case 3: { - message.sourceEntry = reader.string(); - break; - } - case 4: { - message.storageProperties = $root.google.cloud.datacatalog.v1.StorageProperties.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DataSource} DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSource message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DataSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.service != null && message.hasOwnProperty("service")) - switch (message.service) { - default: - return "service: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.sourceEntry != null && message.hasOwnProperty("sourceEntry")) - if (!$util.isString(message.sourceEntry)) - return "sourceEntry: string expected"; - if (message.storageProperties != null && message.hasOwnProperty("storageProperties")) { - properties.properties = 1; - { - var error = $root.google.cloud.datacatalog.v1.StorageProperties.verify(message.storageProperties); - if (error) - return "storageProperties." + error; - } - } - return null; - }; - - /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DataSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DataSource} DataSource - */ - DataSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DataSource) - return object; - var message = new $root.google.cloud.datacatalog.v1.DataSource(); - switch (object.service) { - default: - if (typeof object.service === "number") { - message.service = object.service; - break; - } - break; - case "SERVICE_UNSPECIFIED": - case 0: - message.service = 0; - break; - case "CLOUD_STORAGE": - case 1: - message.service = 1; - break; - case "BIGQUERY": - case 2: - message.service = 2; - break; - } - if (object.resource != null) - message.resource = String(object.resource); - if (object.sourceEntry != null) - message.sourceEntry = String(object.sourceEntry); - if (object.storageProperties != null) { - if (typeof object.storageProperties !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DataSource.storageProperties: object expected"); - message.storageProperties = $root.google.cloud.datacatalog.v1.StorageProperties.fromObject(object.storageProperties); - } - return message; - }; - - /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DataSource - * @static - * @param {google.cloud.datacatalog.v1.DataSource} message DataSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; - object.resource = ""; - object.sourceEntry = ""; - } - if (message.service != null && message.hasOwnProperty("service")) - object.service = options.enums === String ? $root.google.cloud.datacatalog.v1.DataSource.Service[message.service] === undefined ? message.service : $root.google.cloud.datacatalog.v1.DataSource.Service[message.service] : message.service; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.sourceEntry != null && message.hasOwnProperty("sourceEntry")) - object.sourceEntry = message.sourceEntry; - if (message.storageProperties != null && message.hasOwnProperty("storageProperties")) { - object.storageProperties = $root.google.cloud.datacatalog.v1.StorageProperties.toObject(message.storageProperties, options); - if (options.oneofs) - object.properties = "storageProperties"; - } - return object; - }; - - /** - * Converts this DataSource to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DataSource - * @instance - * @returns {Object.} JSON object - */ - DataSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSource - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DataSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DataSource"; - }; - - /** - * Service enum. - * @name google.cloud.datacatalog.v1.DataSource.Service - * @enum {number} - * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value - * @property {number} CLOUD_STORAGE=1 CLOUD_STORAGE value - * @property {number} BIGQUERY=2 BIGQUERY value - */ - DataSource.Service = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_STORAGE"] = 1; - values[valuesById[2] = "BIGQUERY"] = 2; - return values; - })(); - - return DataSource; - })(); - - v1.StorageProperties = (function() { - - /** - * Properties of a StorageProperties. - * @memberof google.cloud.datacatalog.v1 - * @interface IStorageProperties - * @property {Array.|null} [filePattern] StorageProperties filePattern - * @property {string|null} [fileType] StorageProperties fileType - */ - - /** - * Constructs a new StorageProperties. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a StorageProperties. - * @implements IStorageProperties - * @constructor - * @param {google.cloud.datacatalog.v1.IStorageProperties=} [properties] Properties to set - */ - function StorageProperties(properties) { - this.filePattern = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageProperties filePattern. - * @member {Array.} filePattern - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @instance - */ - StorageProperties.prototype.filePattern = $util.emptyArray; - - /** - * StorageProperties fileType. - * @member {string} fileType - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @instance - */ - StorageProperties.prototype.fileType = ""; - - /** - * Creates a new StorageProperties instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @static - * @param {google.cloud.datacatalog.v1.IStorageProperties=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.StorageProperties} StorageProperties instance - */ - StorageProperties.create = function create(properties) { - return new StorageProperties(properties); - }; - - /** - * Encodes the specified StorageProperties message. Does not implicitly {@link google.cloud.datacatalog.v1.StorageProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @static - * @param {google.cloud.datacatalog.v1.IStorageProperties} message StorageProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageProperties.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filePattern != null && message.filePattern.length) - for (var i = 0; i < message.filePattern.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePattern[i]); - if (message.fileType != null && Object.hasOwnProperty.call(message, "fileType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fileType); - return writer; - }; - - /** - * Encodes the specified StorageProperties message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.StorageProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @static - * @param {google.cloud.datacatalog.v1.IStorageProperties} message StorageProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.StorageProperties} StorageProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageProperties.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.StorageProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.filePattern && message.filePattern.length)) - message.filePattern = []; - message.filePattern.push(reader.string()); - break; - } - case 2: { - message.fileType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.StorageProperties} StorageProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageProperties message. - * @function verify - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filePattern != null && message.hasOwnProperty("filePattern")) { - if (!Array.isArray(message.filePattern)) - return "filePattern: array expected"; - for (var i = 0; i < message.filePattern.length; ++i) - if (!$util.isString(message.filePattern[i])) - return "filePattern: string[] expected"; - } - if (message.fileType != null && message.hasOwnProperty("fileType")) - if (!$util.isString(message.fileType)) - return "fileType: string expected"; - return null; - }; - - /** - * Creates a StorageProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.StorageProperties} StorageProperties - */ - StorageProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.StorageProperties) - return object; - var message = new $root.google.cloud.datacatalog.v1.StorageProperties(); - if (object.filePattern) { - if (!Array.isArray(object.filePattern)) - throw TypeError(".google.cloud.datacatalog.v1.StorageProperties.filePattern: array expected"); - message.filePattern = []; - for (var i = 0; i < object.filePattern.length; ++i) - message.filePattern[i] = String(object.filePattern[i]); - } - if (object.fileType != null) - message.fileType = String(object.fileType); - return message; - }; - - /** - * Creates a plain object from a StorageProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @static - * @param {google.cloud.datacatalog.v1.StorageProperties} message StorageProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.filePattern = []; - if (options.defaults) - object.fileType = ""; - if (message.filePattern && message.filePattern.length) { - object.filePattern = []; - for (var j = 0; j < message.filePattern.length; ++j) - object.filePattern[j] = message.filePattern[j]; - } - if (message.fileType != null && message.hasOwnProperty("fileType")) - object.fileType = message.fileType; - return object; - }; - - /** - * Converts this StorageProperties to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @instance - * @returns {Object.} JSON object - */ - StorageProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageProperties - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.StorageProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.StorageProperties"; - }; - - return StorageProperties; - })(); - - v1.DataCatalog = (function() { - - /** - * Constructs a new DataCatalog service. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DataCatalog - * @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 DataCatalog(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DataCatalog.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataCatalog; - - /** - * Creates new DataCatalog service using the specified rpc implementation. - * @function create - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @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 {DataCatalog} RPC service. Useful where requests and/or responses are streamed. - */ - DataCatalog.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|searchCatalog}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef SearchCatalogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.SearchCatalogResponse} [response] SearchCatalogResponse - */ - - /** - * Calls SearchCatalog. - * @function searchCatalog - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ISearchCatalogRequest} request SearchCatalogRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.SearchCatalogCallback} callback Node-style callback called with the error, if any, and SearchCatalogResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.searchCatalog = function searchCatalog(request, callback) { - return this.rpcCall(searchCatalog, $root.google.cloud.datacatalog.v1.SearchCatalogRequest, $root.google.cloud.datacatalog.v1.SearchCatalogResponse, request, callback); - }, "name", { value: "SearchCatalog" }); - - /** - * Calls SearchCatalog. - * @function searchCatalog - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ISearchCatalogRequest} request SearchCatalogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createEntryGroup}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef CreateEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.EntryGroup} [response] EntryGroup - */ - - /** - * Calls CreateEntryGroup. - * @function createEntryGroup - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createEntryGroup = function createEntryGroup(request, callback) { - return this.rpcCall(createEntryGroup, $root.google.cloud.datacatalog.v1.CreateEntryGroupRequest, $root.google.cloud.datacatalog.v1.EntryGroup, request, callback); - }, "name", { value: "CreateEntryGroup" }); - - /** - * Calls CreateEntryGroup. - * @function createEntryGroup - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|getEntryGroup}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef GetEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.EntryGroup} [response] EntryGroup - */ - - /** - * Calls GetEntryGroup. - * @function getEntryGroup - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.GetEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.getEntryGroup = function getEntryGroup(request, callback) { - return this.rpcCall(getEntryGroup, $root.google.cloud.datacatalog.v1.GetEntryGroupRequest, $root.google.cloud.datacatalog.v1.EntryGroup, request, callback); - }, "name", { value: "GetEntryGroup" }); - - /** - * Calls GetEntryGroup. - * @function getEntryGroup - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateEntryGroup}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef UpdateEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.EntryGroup} [response] EntryGroup - */ - - /** - * Calls UpdateEntryGroup. - * @function updateEntryGroup - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateEntryGroupRequest} request UpdateEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateEntryGroup = function updateEntryGroup(request, callback) { - return this.rpcCall(updateEntryGroup, $root.google.cloud.datacatalog.v1.UpdateEntryGroupRequest, $root.google.cloud.datacatalog.v1.EntryGroup, request, callback); - }, "name", { value: "UpdateEntryGroup" }); - - /** - * Calls UpdateEntryGroup. - * @function updateEntryGroup - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateEntryGroupRequest} request UpdateEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteEntryGroup}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef DeleteEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteEntryGroup. - * @function deleteEntryGroup - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroupCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteEntryGroup = function deleteEntryGroup(request, callback) { - return this.rpcCall(deleteEntryGroup, $root.google.cloud.datacatalog.v1.DeleteEntryGroupRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntryGroup" }); - - /** - * Calls DeleteEntryGroup. - * @function deleteEntryGroup - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|listEntryGroups}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef ListEntryGroupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.ListEntryGroupsResponse} [response] ListEntryGroupsResponse - */ - - /** - * Calls ListEntryGroups. - * @function listEntryGroups - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IListEntryGroupsRequest} request ListEntryGroupsRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.ListEntryGroupsCallback} callback Node-style callback called with the error, if any, and ListEntryGroupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.listEntryGroups = function listEntryGroups(request, callback) { - return this.rpcCall(listEntryGroups, $root.google.cloud.datacatalog.v1.ListEntryGroupsRequest, $root.google.cloud.datacatalog.v1.ListEntryGroupsResponse, request, callback); - }, "name", { value: "ListEntryGroups" }); - - /** - * Calls ListEntryGroups. - * @function listEntryGroups - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IListEntryGroupsRequest} request ListEntryGroupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createEntry}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef CreateEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Entry} [response] Entry - */ - - /** - * Calls CreateEntry. - * @function createEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateEntryRequest} request CreateEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.CreateEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createEntry = function createEntry(request, callback) { - return this.rpcCall(createEntry, $root.google.cloud.datacatalog.v1.CreateEntryRequest, $root.google.cloud.datacatalog.v1.Entry, request, callback); - }, "name", { value: "CreateEntry" }); - - /** - * Calls CreateEntry. - * @function createEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateEntryRequest} request CreateEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateEntry}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef UpdateEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Entry} [response] Entry - */ - - /** - * Calls UpdateEntry. - * @function updateEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.UpdateEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateEntry = function updateEntry(request, callback) { - return this.rpcCall(updateEntry, $root.google.cloud.datacatalog.v1.UpdateEntryRequest, $root.google.cloud.datacatalog.v1.Entry, request, callback); - }, "name", { value: "UpdateEntry" }); - - /** - * Calls UpdateEntry. - * @function updateEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteEntry}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef DeleteEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteEntry. - * @function deleteEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.DeleteEntryCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteEntry = function deleteEntry(request, callback) { - return this.rpcCall(deleteEntry, $root.google.cloud.datacatalog.v1.DeleteEntryRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntry" }); - - /** - * Calls DeleteEntry. - * @function deleteEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|getEntry}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef GetEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Entry} [response] Entry - */ - - /** - * Calls GetEntry. - * @function getEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IGetEntryRequest} request GetEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.GetEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.getEntry = function getEntry(request, callback) { - return this.rpcCall(getEntry, $root.google.cloud.datacatalog.v1.GetEntryRequest, $root.google.cloud.datacatalog.v1.Entry, request, callback); - }, "name", { value: "GetEntry" }); - - /** - * Calls GetEntry. - * @function getEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IGetEntryRequest} request GetEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|lookupEntry}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef LookupEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Entry} [response] Entry - */ - - /** - * Calls LookupEntry. - * @function lookupEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ILookupEntryRequest} request LookupEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.LookupEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.lookupEntry = function lookupEntry(request, callback) { - return this.rpcCall(lookupEntry, $root.google.cloud.datacatalog.v1.LookupEntryRequest, $root.google.cloud.datacatalog.v1.Entry, request, callback); - }, "name", { value: "LookupEntry" }); - - /** - * Calls LookupEntry. - * @function lookupEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ILookupEntryRequest} request LookupEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|listEntries}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef ListEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.ListEntriesResponse} [response] ListEntriesResponse - */ - - /** - * Calls ListEntries. - * @function listEntries - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IListEntriesRequest} request ListEntriesRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.ListEntriesCallback} callback Node-style callback called with the error, if any, and ListEntriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.listEntries = function listEntries(request, callback) { - return this.rpcCall(listEntries, $root.google.cloud.datacatalog.v1.ListEntriesRequest, $root.google.cloud.datacatalog.v1.ListEntriesResponse, request, callback); - }, "name", { value: "ListEntries" }); - - /** - * Calls ListEntries. - * @function listEntries - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IListEntriesRequest} request ListEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|modifyEntryOverview}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef ModifyEntryOverviewCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.EntryOverview} [response] EntryOverview - */ - - /** - * Calls ModifyEntryOverview. - * @function modifyEntryOverview - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IModifyEntryOverviewRequest} request ModifyEntryOverviewRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.ModifyEntryOverviewCallback} callback Node-style callback called with the error, if any, and EntryOverview - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.modifyEntryOverview = function modifyEntryOverview(request, callback) { - return this.rpcCall(modifyEntryOverview, $root.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest, $root.google.cloud.datacatalog.v1.EntryOverview, request, callback); - }, "name", { value: "ModifyEntryOverview" }); - - /** - * Calls ModifyEntryOverview. - * @function modifyEntryOverview - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IModifyEntryOverviewRequest} request ModifyEntryOverviewRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|modifyEntryContacts}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef ModifyEntryContactsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Contacts} [response] Contacts - */ - - /** - * Calls ModifyEntryContacts. - * @function modifyEntryContacts - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IModifyEntryContactsRequest} request ModifyEntryContactsRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.ModifyEntryContactsCallback} callback Node-style callback called with the error, if any, and Contacts - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.modifyEntryContacts = function modifyEntryContacts(request, callback) { - return this.rpcCall(modifyEntryContacts, $root.google.cloud.datacatalog.v1.ModifyEntryContactsRequest, $root.google.cloud.datacatalog.v1.Contacts, request, callback); - }, "name", { value: "ModifyEntryContacts" }); - - /** - * Calls ModifyEntryContacts. - * @function modifyEntryContacts - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IModifyEntryContactsRequest} request ModifyEntryContactsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createTagTemplate}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef CreateTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.TagTemplate} [response] TagTemplate - */ - - /** - * Calls CreateTagTemplate. - * @function createTagTemplate - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateRequest} request CreateTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createTagTemplate = function createTagTemplate(request, callback) { - return this.rpcCall(createTagTemplate, $root.google.cloud.datacatalog.v1.CreateTagTemplateRequest, $root.google.cloud.datacatalog.v1.TagTemplate, request, callback); - }, "name", { value: "CreateTagTemplate" }); - - /** - * Calls CreateTagTemplate. - * @function createTagTemplate - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateRequest} request CreateTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|getTagTemplate}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef GetTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.TagTemplate} [response] TagTemplate - */ - - /** - * Calls GetTagTemplate. - * @function getTagTemplate - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IGetTagTemplateRequest} request GetTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.GetTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.getTagTemplate = function getTagTemplate(request, callback) { - return this.rpcCall(getTagTemplate, $root.google.cloud.datacatalog.v1.GetTagTemplateRequest, $root.google.cloud.datacatalog.v1.TagTemplate, request, callback); - }, "name", { value: "GetTagTemplate" }); - - /** - * Calls GetTagTemplate. - * @function getTagTemplate - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IGetTagTemplateRequest} request GetTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateTagTemplate}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef UpdateTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.TagTemplate} [response] TagTemplate - */ - - /** - * Calls UpdateTagTemplate. - * @function updateTagTemplate - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateRequest} request UpdateTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateTagTemplate = function updateTagTemplate(request, callback) { - return this.rpcCall(updateTagTemplate, $root.google.cloud.datacatalog.v1.UpdateTagTemplateRequest, $root.google.cloud.datacatalog.v1.TagTemplate, request, callback); - }, "name", { value: "UpdateTagTemplate" }); - - /** - * Calls UpdateTagTemplate. - * @function updateTagTemplate - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateRequest} request UpdateTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteTagTemplate}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef DeleteTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTagTemplate. - * @function deleteTagTemplate - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateRequest} request DeleteTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteTagTemplate = function deleteTagTemplate(request, callback) { - return this.rpcCall(deleteTagTemplate, $root.google.cloud.datacatalog.v1.DeleteTagTemplateRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTagTemplate" }); - - /** - * Calls DeleteTagTemplate. - * @function deleteTagTemplate - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateRequest} request DeleteTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createTagTemplateField}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef CreateTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.TagTemplateField} [response] TagTemplateField - */ - - /** - * Calls CreateTagTemplateField. - * @function createTagTemplateField - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest} request CreateTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createTagTemplateField = function createTagTemplateField(request, callback) { - return this.rpcCall(createTagTemplateField, $root.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1.TagTemplateField, request, callback); - }, "name", { value: "CreateTagTemplateField" }); - - /** - * Calls CreateTagTemplateField. - * @function createTagTemplateField - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest} request CreateTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateTagTemplateField}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef UpdateTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.TagTemplateField} [response] TagTemplateField - */ - - /** - * Calls UpdateTagTemplateField. - * @function updateTagTemplateField - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest} request UpdateTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateTagTemplateField = function updateTagTemplateField(request, callback) { - return this.rpcCall(updateTagTemplateField, $root.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1.TagTemplateField, request, callback); - }, "name", { value: "UpdateTagTemplateField" }); - - /** - * Calls UpdateTagTemplateField. - * @function updateTagTemplateField - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest} request UpdateTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|renameTagTemplateField}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef RenameTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.TagTemplateField} [response] TagTemplateField - */ - - /** - * Calls RenameTagTemplateField. - * @function renameTagTemplateField - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest} request RenameTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.renameTagTemplateField = function renameTagTemplateField(request, callback) { - return this.rpcCall(renameTagTemplateField, $root.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1.TagTemplateField, request, callback); - }, "name", { value: "RenameTagTemplateField" }); - - /** - * Calls RenameTagTemplateField. - * @function renameTagTemplateField - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest} request RenameTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|renameTagTemplateFieldEnumValue}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef RenameTagTemplateFieldEnumValueCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.TagTemplateField} [response] TagTemplateField - */ - - /** - * Calls RenameTagTemplateFieldEnumValue. - * @function renameTagTemplateFieldEnumValue - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest} request RenameTagTemplateFieldEnumValueRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValueCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.renameTagTemplateFieldEnumValue = function renameTagTemplateFieldEnumValue(request, callback) { - return this.rpcCall(renameTagTemplateFieldEnumValue, $root.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest, $root.google.cloud.datacatalog.v1.TagTemplateField, request, callback); - }, "name", { value: "RenameTagTemplateFieldEnumValue" }); - - /** - * Calls RenameTagTemplateFieldEnumValue. - * @function renameTagTemplateFieldEnumValue - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest} request RenameTagTemplateFieldEnumValueRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteTagTemplateField}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef DeleteTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTagTemplateField. - * @function deleteTagTemplateField - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest} request DeleteTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteTagTemplateField = function deleteTagTemplateField(request, callback) { - return this.rpcCall(deleteTagTemplateField, $root.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTagTemplateField" }); - - /** - * Calls DeleteTagTemplateField. - * @function deleteTagTemplateField - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest} request DeleteTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|createTag}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef CreateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Tag} [response] Tag - */ - - /** - * Calls CreateTag. - * @function createTag - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateTagRequest} request CreateTagRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.CreateTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createTag = function createTag(request, callback) { - return this.rpcCall(createTag, $root.google.cloud.datacatalog.v1.CreateTagRequest, $root.google.cloud.datacatalog.v1.Tag, request, callback); - }, "name", { value: "CreateTag" }); - - /** - * Calls CreateTag. - * @function createTag - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.ICreateTagRequest} request CreateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|updateTag}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef UpdateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Tag} [response] Tag - */ - - /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.UpdateTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateTag = function updateTag(request, callback) { - return this.rpcCall(updateTag, $root.google.cloud.datacatalog.v1.UpdateTagRequest, $root.google.cloud.datacatalog.v1.Tag, request, callback); - }, "name", { value: "UpdateTag" }); - - /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|deleteTag}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef DeleteTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTag. - * @function deleteTag - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.DeleteTagCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteTag = function deleteTag(request, callback) { - return this.rpcCall(deleteTag, $root.google.cloud.datacatalog.v1.DeleteTagRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTag" }); - - /** - * Calls DeleteTag. - * @function deleteTag - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|listTags}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef ListTagsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.ListTagsResponse} [response] ListTagsResponse - */ - - /** - * Calls ListTags. - * @function listTags - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IListTagsRequest} request ListTagsRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.ListTagsCallback} callback Node-style callback called with the error, if any, and ListTagsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.listTags = function listTags(request, callback) { - return this.rpcCall(listTags, $root.google.cloud.datacatalog.v1.ListTagsRequest, $root.google.cloud.datacatalog.v1.ListTagsResponse, request, callback); - }, "name", { value: "ListTags" }); - - /** - * Calls ListTags. - * @function listTags - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IListTagsRequest} request ListTagsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|starEntry}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef StarEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.StarEntryResponse} [response] StarEntryResponse - */ - - /** - * Calls StarEntry. - * @function starEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IStarEntryRequest} request StarEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.StarEntryCallback} callback Node-style callback called with the error, if any, and StarEntryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.starEntry = function starEntry(request, callback) { - return this.rpcCall(starEntry, $root.google.cloud.datacatalog.v1.StarEntryRequest, $root.google.cloud.datacatalog.v1.StarEntryResponse, request, callback); - }, "name", { value: "StarEntry" }); - - /** - * Calls StarEntry. - * @function starEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IStarEntryRequest} request StarEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|unstarEntry}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef UnstarEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.UnstarEntryResponse} [response] UnstarEntryResponse - */ - - /** - * Calls UnstarEntry. - * @function unstarEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUnstarEntryRequest} request UnstarEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.UnstarEntryCallback} callback Node-style callback called with the error, if any, and UnstarEntryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.unstarEntry = function unstarEntry(request, callback) { - return this.rpcCall(unstarEntry, $root.google.cloud.datacatalog.v1.UnstarEntryRequest, $root.google.cloud.datacatalog.v1.UnstarEntryResponse, request, callback); - }, "name", { value: "UnstarEntry" }); - - /** - * Calls UnstarEntry. - * @function unstarEntry - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1.IUnstarEntryRequest} request UnstarEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|setIamPolicy}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|getIamPolicy}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.DataCatalog|testIamPermissions}. - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.datacatalog.v1.DataCatalog.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1.DataCatalog - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return DataCatalog; - })(); - - v1.SearchCatalogRequest = (function() { - - /** - * Properties of a SearchCatalogRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ISearchCatalogRequest - * @property {google.cloud.datacatalog.v1.SearchCatalogRequest.IScope|null} [scope] SearchCatalogRequest scope - * @property {string|null} [query] SearchCatalogRequest query - * @property {number|null} [pageSize] SearchCatalogRequest pageSize - * @property {string|null} [pageToken] SearchCatalogRequest pageToken - * @property {string|null} [orderBy] SearchCatalogRequest orderBy - */ - - /** - * Constructs a new SearchCatalogRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a SearchCatalogRequest. - * @implements ISearchCatalogRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ISearchCatalogRequest=} [properties] Properties to set - */ - function SearchCatalogRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchCatalogRequest scope. - * @member {google.cloud.datacatalog.v1.SearchCatalogRequest.IScope|null|undefined} scope - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.scope = null; - - /** - * SearchCatalogRequest query. - * @member {string} query - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.query = ""; - - /** - * SearchCatalogRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.pageSize = 0; - - /** - * SearchCatalogRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.pageToken = ""; - - /** - * SearchCatalogRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.orderBy = ""; - - /** - * Creates a new SearchCatalogRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @static - * @param {google.cloud.datacatalog.v1.ISearchCatalogRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.SearchCatalogRequest} SearchCatalogRequest instance - */ - SearchCatalogRequest.create = function create(properties) { - return new SearchCatalogRequest(properties); - }; - - /** - * Encodes the specified SearchCatalogRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @static - * @param {google.cloud.datacatalog.v1.ISearchCatalogRequest} message SearchCatalogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - $root.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.encode(message.scope, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SearchCatalogRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @static - * @param {google.cloud.datacatalog.v1.ISearchCatalogRequest} message SearchCatalogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.SearchCatalogRequest} SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.SearchCatalogRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: { - message.scope = $root.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.decode(reader, reader.uint32()); - break; - } - case 1: { - message.query = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.SearchCatalogRequest} SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchCatalogRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchCatalogRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) { - var error = $root.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.verify(message.scope); - if (error) - return "scope." + error; - } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a SearchCatalogRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.SearchCatalogRequest} SearchCatalogRequest - */ - SearchCatalogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.SearchCatalogRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.SearchCatalogRequest(); - if (object.scope != null) { - if (typeof object.scope !== "object") - throw TypeError(".google.cloud.datacatalog.v1.SearchCatalogRequest.scope: object expected"); - message.scope = $root.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.fromObject(object.scope); - } - if (object.query != null) - message.query = String(object.query); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a SearchCatalogRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @static - * @param {google.cloud.datacatalog.v1.SearchCatalogRequest} message SearchCatalogRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchCatalogRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.query = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - object.scope = null; - } - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = $root.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.toObject(message.scope, options); - return object; - }; - - /** - * Converts this SearchCatalogRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @instance - * @returns {Object.} JSON object - */ - SearchCatalogRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchCatalogRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchCatalogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.SearchCatalogRequest"; - }; - - SearchCatalogRequest.Scope = (function() { - - /** - * Properties of a Scope. - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @interface IScope - * @property {Array.|null} [includeOrgIds] Scope includeOrgIds - * @property {Array.|null} [includeProjectIds] Scope includeProjectIds - * @property {boolean|null} [includeGcpPublicDatasets] Scope includeGcpPublicDatasets - * @property {Array.|null} [restrictedLocations] Scope restrictedLocations - * @property {boolean|null} [starredOnly] Scope starredOnly - * @property {boolean|null} [includePublicTagTemplates] Scope includePublicTagTemplates - */ - - /** - * Constructs a new Scope. - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest - * @classdesc Represents a Scope. - * @implements IScope - * @constructor - * @param {google.cloud.datacatalog.v1.SearchCatalogRequest.IScope=} [properties] Properties to set - */ - function Scope(properties) { - this.includeOrgIds = []; - this.includeProjectIds = []; - this.restrictedLocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Scope includeOrgIds. - * @member {Array.} includeOrgIds - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includeOrgIds = $util.emptyArray; - - /** - * Scope includeProjectIds. - * @member {Array.} includeProjectIds - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includeProjectIds = $util.emptyArray; - - /** - * Scope includeGcpPublicDatasets. - * @member {boolean} includeGcpPublicDatasets - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includeGcpPublicDatasets = false; - - /** - * Scope restrictedLocations. - * @member {Array.} restrictedLocations - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.restrictedLocations = $util.emptyArray; - - /** - * Scope starredOnly. - * @member {boolean} starredOnly - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.starredOnly = false; - - /** - * Scope includePublicTagTemplates. - * @member {boolean} includePublicTagTemplates - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includePublicTagTemplates = false; - - /** - * Creates a new Scope instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1.SearchCatalogRequest.IScope=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} Scope instance - */ - Scope.create = function create(properties) { - return new Scope(properties); - }; - - /** - * Encodes the specified Scope message. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1.SearchCatalogRequest.IScope} message Scope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scope.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.includeOrgIds != null && message.includeOrgIds.length) - for (var i = 0; i < message.includeOrgIds.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.includeOrgIds[i]); - if (message.includeProjectIds != null && message.includeProjectIds.length) - for (var i = 0; i < message.includeProjectIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.includeProjectIds[i]); - if (message.includeGcpPublicDatasets != null && Object.hasOwnProperty.call(message, "includeGcpPublicDatasets")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.includeGcpPublicDatasets); - if (message.restrictedLocations != null && message.restrictedLocations.length) - for (var i = 0; i < message.restrictedLocations.length; ++i) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.restrictedLocations[i]); - if (message.starredOnly != null && Object.hasOwnProperty.call(message, "starredOnly")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.starredOnly); - if (message.includePublicTagTemplates != null && Object.hasOwnProperty.call(message, "includePublicTagTemplates")) - writer.uint32(/* id 19, wireType 0 =*/152).bool(message.includePublicTagTemplates); - return writer; - }; - - /** - * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1.SearchCatalogRequest.IScope} message Scope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scope.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Scope message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scope.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.includeOrgIds && message.includeOrgIds.length)) - message.includeOrgIds = []; - message.includeOrgIds.push(reader.string()); - break; - } - case 3: { - if (!(message.includeProjectIds && message.includeProjectIds.length)) - message.includeProjectIds = []; - message.includeProjectIds.push(reader.string()); - break; - } - case 7: { - message.includeGcpPublicDatasets = reader.bool(); - break; - } - case 16: { - if (!(message.restrictedLocations && message.restrictedLocations.length)) - message.restrictedLocations = []; - message.restrictedLocations.push(reader.string()); - break; - } - case 18: { - message.starredOnly = reader.bool(); - break; - } - case 19: { - message.includePublicTagTemplates = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Scope message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scope.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Scope message. - * @function verify - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Scope.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.includeOrgIds != null && message.hasOwnProperty("includeOrgIds")) { - if (!Array.isArray(message.includeOrgIds)) - return "includeOrgIds: array expected"; - for (var i = 0; i < message.includeOrgIds.length; ++i) - if (!$util.isString(message.includeOrgIds[i])) - return "includeOrgIds: string[] expected"; - } - if (message.includeProjectIds != null && message.hasOwnProperty("includeProjectIds")) { - if (!Array.isArray(message.includeProjectIds)) - return "includeProjectIds: array expected"; - for (var i = 0; i < message.includeProjectIds.length; ++i) - if (!$util.isString(message.includeProjectIds[i])) - return "includeProjectIds: string[] expected"; - } - if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) - if (typeof message.includeGcpPublicDatasets !== "boolean") - return "includeGcpPublicDatasets: boolean expected"; - if (message.restrictedLocations != null && message.hasOwnProperty("restrictedLocations")) { - if (!Array.isArray(message.restrictedLocations)) - return "restrictedLocations: array expected"; - for (var i = 0; i < message.restrictedLocations.length; ++i) - if (!$util.isString(message.restrictedLocations[i])) - return "restrictedLocations: string[] expected"; - } - if (message.starredOnly != null && message.hasOwnProperty("starredOnly")) - if (typeof message.starredOnly !== "boolean") - return "starredOnly: boolean expected"; - if (message.includePublicTagTemplates != null && message.hasOwnProperty("includePublicTagTemplates")) - if (typeof message.includePublicTagTemplates !== "boolean") - return "includePublicTagTemplates: boolean expected"; - return null; - }; - - /** - * Creates a Scope message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} Scope - */ - Scope.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope) - return object; - var message = new $root.google.cloud.datacatalog.v1.SearchCatalogRequest.Scope(); - if (object.includeOrgIds) { - if (!Array.isArray(object.includeOrgIds)) - throw TypeError(".google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.includeOrgIds: array expected"); - message.includeOrgIds = []; - for (var i = 0; i < object.includeOrgIds.length; ++i) - message.includeOrgIds[i] = String(object.includeOrgIds[i]); - } - if (object.includeProjectIds) { - if (!Array.isArray(object.includeProjectIds)) - throw TypeError(".google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.includeProjectIds: array expected"); - message.includeProjectIds = []; - for (var i = 0; i < object.includeProjectIds.length; ++i) - message.includeProjectIds[i] = String(object.includeProjectIds[i]); - } - if (object.includeGcpPublicDatasets != null) - message.includeGcpPublicDatasets = Boolean(object.includeGcpPublicDatasets); - if (object.restrictedLocations) { - if (!Array.isArray(object.restrictedLocations)) - throw TypeError(".google.cloud.datacatalog.v1.SearchCatalogRequest.Scope.restrictedLocations: array expected"); - message.restrictedLocations = []; - for (var i = 0; i < object.restrictedLocations.length; ++i) - message.restrictedLocations[i] = String(object.restrictedLocations[i]); - } - if (object.starredOnly != null) - message.starredOnly = Boolean(object.starredOnly); - if (object.includePublicTagTemplates != null) - message.includePublicTagTemplates = Boolean(object.includePublicTagTemplates); - return message; - }; - - /** - * Creates a plain object from a Scope message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} message Scope - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Scope.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includeOrgIds = []; - object.includeProjectIds = []; - object.restrictedLocations = []; - } - if (options.defaults) { - object.includeGcpPublicDatasets = false; - object.starredOnly = false; - object.includePublicTagTemplates = false; - } - if (message.includeOrgIds && message.includeOrgIds.length) { - object.includeOrgIds = []; - for (var j = 0; j < message.includeOrgIds.length; ++j) - object.includeOrgIds[j] = message.includeOrgIds[j]; - } - if (message.includeProjectIds && message.includeProjectIds.length) { - object.includeProjectIds = []; - for (var j = 0; j < message.includeProjectIds.length; ++j) - object.includeProjectIds[j] = message.includeProjectIds[j]; - } - if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) - object.includeGcpPublicDatasets = message.includeGcpPublicDatasets; - if (message.restrictedLocations && message.restrictedLocations.length) { - object.restrictedLocations = []; - for (var j = 0; j < message.restrictedLocations.length; ++j) - object.restrictedLocations[j] = message.restrictedLocations[j]; - } - if (message.starredOnly != null && message.hasOwnProperty("starredOnly")) - object.starredOnly = message.starredOnly; - if (message.includePublicTagTemplates != null && message.hasOwnProperty("includePublicTagTemplates")) - object.includePublicTagTemplates = message.includePublicTagTemplates; - return object; - }; - - /** - * Converts this Scope to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @instance - * @returns {Object.} JSON object - */ - Scope.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Scope - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.SearchCatalogRequest.Scope - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Scope.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.SearchCatalogRequest.Scope"; - }; - - return Scope; - })(); - - return SearchCatalogRequest; - })(); - - v1.SearchCatalogResponse = (function() { - - /** - * Properties of a SearchCatalogResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface ISearchCatalogResponse - * @property {Array.|null} [results] SearchCatalogResponse results - * @property {string|null} [nextPageToken] SearchCatalogResponse nextPageToken - * @property {Array.|null} [unreachable] SearchCatalogResponse unreachable - */ - - /** - * Constructs a new SearchCatalogResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a SearchCatalogResponse. - * @implements ISearchCatalogResponse - * @constructor - * @param {google.cloud.datacatalog.v1.ISearchCatalogResponse=} [properties] Properties to set - */ - function SearchCatalogResponse(properties) { - this.results = []; - this.unreachable = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchCatalogResponse results. - * @member {Array.} results - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.results = $util.emptyArray; - - /** - * SearchCatalogResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.nextPageToken = ""; - - /** - * SearchCatalogResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new SearchCatalogResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @static - * @param {google.cloud.datacatalog.v1.ISearchCatalogResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.SearchCatalogResponse} SearchCatalogResponse instance - */ - SearchCatalogResponse.create = function create(properties) { - return new SearchCatalogResponse(properties); - }; - - /** - * Encodes the specified SearchCatalogResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @static - * @param {google.cloud.datacatalog.v1.ISearchCatalogResponse} message SearchCatalogResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.datacatalog.v1.SearchCatalogResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.unreachable[i]); - return writer; - }; - - /** - * Encodes the specified SearchCatalogResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @static - * @param {google.cloud.datacatalog.v1.ISearchCatalogResponse} message SearchCatalogResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.SearchCatalogResponse} SearchCatalogResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.SearchCatalogResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.results && message.results.length)) - message.results = []; - message.results.push($root.google.cloud.datacatalog.v1.SearchCatalogResult.decode(reader, reader.uint32())); - break; - } - case 3: { - message.nextPageToken = reader.string(); - break; - } - case 6: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.SearchCatalogResponse} SearchCatalogResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchCatalogResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchCatalogResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.SearchCatalogResult.verify(message.results[i]); - if (error) - return "results." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; - - /** - * Creates a SearchCatalogResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.SearchCatalogResponse} SearchCatalogResponse - */ - SearchCatalogResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.SearchCatalogResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.SearchCatalogResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.datacatalog.v1.SearchCatalogResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.SearchCatalogResponse.results: object expected"); - message.results[i] = $root.google.cloud.datacatalog.v1.SearchCatalogResult.fromObject(object.results[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.datacatalog.v1.SearchCatalogResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; - - /** - * Creates a plain object from a SearchCatalogResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @static - * @param {google.cloud.datacatalog.v1.SearchCatalogResponse} message SearchCatalogResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchCatalogResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.results = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.datacatalog.v1.SearchCatalogResult.toObject(message.results[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; - - /** - * Converts this SearchCatalogResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @instance - * @returns {Object.} JSON object - */ - SearchCatalogResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchCatalogResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.SearchCatalogResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchCatalogResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.SearchCatalogResponse"; - }; - - return SearchCatalogResponse; - })(); - - v1.CreateEntryGroupRequest = (function() { - - /** - * Properties of a CreateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ICreateEntryGroupRequest - * @property {string|null} [parent] CreateEntryGroupRequest parent - * @property {string|null} [entryGroupId] CreateEntryGroupRequest entryGroupId - * @property {google.cloud.datacatalog.v1.IEntryGroup|null} [entryGroup] CreateEntryGroupRequest entryGroup - */ - - /** - * Constructs a new CreateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CreateEntryGroupRequest. - * @implements ICreateEntryGroupRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ICreateEntryGroupRequest=} [properties] Properties to set - */ - function CreateEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEntryGroupRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.parent = ""; - - /** - * CreateEntryGroupRequest entryGroupId. - * @member {string} entryGroupId - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.entryGroupId = ""; - - /** - * CreateEntryGroupRequest entryGroup. - * @member {google.cloud.datacatalog.v1.IEntryGroup|null|undefined} entryGroup - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.entryGroup = null; - - /** - * Creates a new CreateEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CreateEntryGroupRequest} CreateEntryGroupRequest instance - */ - CreateEntryGroupRequest.create = function create(properties) { - return new CreateEntryGroupRequest(properties); - }; - - /** - * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateEntryGroupRequest} message CreateEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryGroupRequest.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.entryGroup != null && Object.hasOwnProperty.call(message, "entryGroup")) - $root.google.cloud.datacatalog.v1.EntryGroup.encode(message.entryGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.entryGroupId != null && Object.hasOwnProperty.call(message, "entryGroupId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryGroupId); - return writer; - }; - - /** - * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateEntryGroupRequest} message CreateEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.CreateEntryGroupRequest} CreateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryGroupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.CreateEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.entryGroupId = reader.string(); - break; - } - case 2: { - message.entryGroup = $root.google.cloud.datacatalog.v1.EntryGroup.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CreateEntryGroupRequest} CreateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEntryGroupRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEntryGroupRequest.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.entryGroupId != null && message.hasOwnProperty("entryGroupId")) - if (!$util.isString(message.entryGroupId)) - return "entryGroupId: string expected"; - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) { - var error = $root.google.cloud.datacatalog.v1.EntryGroup.verify(message.entryGroup); - if (error) - return "entryGroup." + error; - } - return null; - }; - - /** - * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CreateEntryGroupRequest} CreateEntryGroupRequest - */ - CreateEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CreateEntryGroupRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.CreateEntryGroupRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entryGroupId != null) - message.entryGroupId = String(object.entryGroupId); - if (object.entryGroup != null) { - if (typeof object.entryGroup !== "object") - throw TypeError(".google.cloud.datacatalog.v1.CreateEntryGroupRequest.entryGroup: object expected"); - message.entryGroup = $root.google.cloud.datacatalog.v1.EntryGroup.fromObject(object.entryGroup); - } - return message; - }; - - /** - * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.CreateEntryGroupRequest} message CreateEntryGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEntryGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.entryGroup = null; - object.entryGroupId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) - object.entryGroup = $root.google.cloud.datacatalog.v1.EntryGroup.toObject(message.entryGroup, options); - if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) - object.entryGroupId = message.entryGroupId; - return object; - }; - - /** - * Converts this CreateEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEntryGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEntryGroupRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CreateEntryGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEntryGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CreateEntryGroupRequest"; - }; - - return CreateEntryGroupRequest; - })(); - - v1.UpdateEntryGroupRequest = (function() { - - /** - * Properties of an UpdateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IUpdateEntryGroupRequest - * @property {google.cloud.datacatalog.v1.IEntryGroup|null} [entryGroup] UpdateEntryGroupRequest entryGroup - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryGroupRequest updateMask - */ - - /** - * Constructs a new UpdateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an UpdateEntryGroupRequest. - * @implements IUpdateEntryGroupRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IUpdateEntryGroupRequest=} [properties] Properties to set - */ - function UpdateEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEntryGroupRequest entryGroup. - * @member {google.cloud.datacatalog.v1.IEntryGroup|null|undefined} entryGroup - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @instance - */ - UpdateEntryGroupRequest.prototype.entryGroup = null; - - /** - * UpdateEntryGroupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @instance - */ - UpdateEntryGroupRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UpdateEntryGroupRequest} UpdateEntryGroupRequest instance - */ - UpdateEntryGroupRequest.create = function create(properties) { - return new UpdateEntryGroupRequest(properties); - }; - - /** - * Encodes the specified UpdateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateEntryGroupRequest} message UpdateEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entryGroup != null && Object.hasOwnProperty.call(message, "entryGroup")) - $root.google.cloud.datacatalog.v1.EntryGroup.encode(message.entryGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateEntryGroupRequest} message UpdateEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEntryGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UpdateEntryGroupRequest} UpdateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryGroupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UpdateEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entryGroup = $root.google.cloud.datacatalog.v1.EntryGroup.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEntryGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UpdateEntryGroupRequest} UpdateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEntryGroupRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEntryGroupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) { - var error = $root.google.cloud.datacatalog.v1.EntryGroup.verify(message.entryGroup); - if (error) - return "entryGroup." + 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 UpdateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UpdateEntryGroupRequest} UpdateEntryGroupRequest - */ - UpdateEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UpdateEntryGroupRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.UpdateEntryGroupRequest(); - if (object.entryGroup != null) { - if (typeof object.entryGroup !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateEntryGroupRequest.entryGroup: object expected"); - message.entryGroup = $root.google.cloud.datacatalog.v1.EntryGroup.fromObject(object.entryGroup); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateEntryGroupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.UpdateEntryGroupRequest} message UpdateEntryGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEntryGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entryGroup = null; - object.updateMask = null; - } - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) - object.entryGroup = $root.google.cloud.datacatalog.v1.EntryGroup.toObject(message.entryGroup, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEntryGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEntryGroupRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UpdateEntryGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEntryGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UpdateEntryGroupRequest"; - }; - - return UpdateEntryGroupRequest; - })(); - - v1.GetEntryGroupRequest = (function() { - - /** - * Properties of a GetEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IGetEntryGroupRequest - * @property {string|null} [name] GetEntryGroupRequest name - * @property {google.protobuf.IFieldMask|null} [readMask] GetEntryGroupRequest readMask - */ - - /** - * Constructs a new GetEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a GetEntryGroupRequest. - * @implements IGetEntryGroupRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IGetEntryGroupRequest=} [properties] Properties to set - */ - function GetEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEntryGroupRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @instance - */ - GetEntryGroupRequest.prototype.name = ""; - - /** - * GetEntryGroupRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @instance - */ - GetEntryGroupRequest.prototype.readMask = null; - - /** - * Creates a new GetEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.GetEntryGroupRequest} GetEntryGroupRequest instance - */ - GetEntryGroupRequest.create = function create(properties) { - return new GetEntryGroupRequest(properties); - }; - - /** - * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetEntryGroupRequest} message GetEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryGroupRequest.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.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetEntryGroupRequest} message GetEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.GetEntryGroupRequest} GetEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryGroupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.GetEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.GetEntryGroupRequest} GetEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEntryGroupRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEntryGroupRequest.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.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - return null; - }; - - /** - * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.GetEntryGroupRequest} GetEntryGroupRequest - */ - GetEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.GetEntryGroupRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.GetEntryGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1.GetEntryGroupRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - return message; - }; - - /** - * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.GetEntryGroupRequest} message GetEntryGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEntryGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.readMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - return object; - }; - - /** - * Converts this GetEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @instance - * @returns {Object.} JSON object - */ - GetEntryGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEntryGroupRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.GetEntryGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEntryGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.GetEntryGroupRequest"; - }; - - return GetEntryGroupRequest; - })(); - - v1.DeleteEntryGroupRequest = (function() { - - /** - * Properties of a DeleteEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IDeleteEntryGroupRequest - * @property {string|null} [name] DeleteEntryGroupRequest name - * @property {boolean|null} [force] DeleteEntryGroupRequest force - */ - - /** - * Constructs a new DeleteEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DeleteEntryGroupRequest. - * @implements IDeleteEntryGroupRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IDeleteEntryGroupRequest=} [properties] Properties to set - */ - function DeleteEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEntryGroupRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @instance - */ - DeleteEntryGroupRequest.prototype.name = ""; - - /** - * DeleteEntryGroupRequest force. - * @member {boolean} force - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @instance - */ - DeleteEntryGroupRequest.prototype.force = false; - - /** - * Creates a new DeleteEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DeleteEntryGroupRequest} DeleteEntryGroupRequest instance - */ - DeleteEntryGroupRequest.create = function create(properties) { - return new DeleteEntryGroupRequest(properties); - }; - - /** - * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteEntryGroupRequest} message DeleteEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteEntryGroupRequest} message DeleteEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DeleteEntryGroupRequest} DeleteEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryGroupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DeleteEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DeleteEntryGroupRequest} DeleteEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEntryGroupRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEntryGroupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DeleteEntryGroupRequest} DeleteEntryGroupRequest - */ - DeleteEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DeleteEntryGroupRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.DeleteEntryGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1.DeleteEntryGroupRequest} message DeleteEntryGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEntryGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEntryGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEntryGroupRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DeleteEntryGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEntryGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DeleteEntryGroupRequest"; - }; - - return DeleteEntryGroupRequest; - })(); - - v1.ListEntryGroupsRequest = (function() { - - /** - * Properties of a ListEntryGroupsRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IListEntryGroupsRequest - * @property {string|null} [parent] ListEntryGroupsRequest parent - * @property {number|null} [pageSize] ListEntryGroupsRequest pageSize - * @property {string|null} [pageToken] ListEntryGroupsRequest pageToken - */ - - /** - * Constructs a new ListEntryGroupsRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListEntryGroupsRequest. - * @implements IListEntryGroupsRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IListEntryGroupsRequest=} [properties] Properties to set - */ - function ListEntryGroupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntryGroupsRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.parent = ""; - - /** - * ListEntryGroupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.pageSize = 0; - - /** - * ListEntryGroupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListEntryGroupsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @static - * @param {google.cloud.datacatalog.v1.IListEntryGroupsRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListEntryGroupsRequest} ListEntryGroupsRequest instance - */ - ListEntryGroupsRequest.create = function create(properties) { - return new ListEntryGroupsRequest(properties); - }; - - /** - * Encodes the specified ListEntryGroupsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntryGroupsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @static - * @param {google.cloud.datacatalog.v1.IListEntryGroupsRequest} message ListEntryGroupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryGroupsRequest.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 ListEntryGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntryGroupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @static - * @param {google.cloud.datacatalog.v1.IListEntryGroupsRequest} message ListEntryGroupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntryGroupsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListEntryGroupsRequest} ListEntryGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryGroupsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListEntryGroupsRequest(); - 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 ListEntryGroupsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListEntryGroupsRequest} ListEntryGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryGroupsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntryGroupsRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntryGroupsRequest.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 ListEntryGroupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListEntryGroupsRequest} ListEntryGroupsRequest - */ - ListEntryGroupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListEntryGroupsRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListEntryGroupsRequest(); - 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 ListEntryGroupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @static - * @param {google.cloud.datacatalog.v1.ListEntryGroupsRequest} message ListEntryGroupsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntryGroupsRequest.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 ListEntryGroupsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @instance - * @returns {Object.} JSON object - */ - ListEntryGroupsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntryGroupsRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntryGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListEntryGroupsRequest"; - }; - - return ListEntryGroupsRequest; - })(); - - v1.ListEntryGroupsResponse = (function() { - - /** - * Properties of a ListEntryGroupsResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IListEntryGroupsResponse - * @property {Array.|null} [entryGroups] ListEntryGroupsResponse entryGroups - * @property {string|null} [nextPageToken] ListEntryGroupsResponse nextPageToken - */ - - /** - * Constructs a new ListEntryGroupsResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListEntryGroupsResponse. - * @implements IListEntryGroupsResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IListEntryGroupsResponse=} [properties] Properties to set - */ - function ListEntryGroupsResponse(properties) { - this.entryGroups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntryGroupsResponse entryGroups. - * @member {Array.} entryGroups - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @instance - */ - ListEntryGroupsResponse.prototype.entryGroups = $util.emptyArray; - - /** - * ListEntryGroupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @instance - */ - ListEntryGroupsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEntryGroupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @static - * @param {google.cloud.datacatalog.v1.IListEntryGroupsResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListEntryGroupsResponse} ListEntryGroupsResponse instance - */ - ListEntryGroupsResponse.create = function create(properties) { - return new ListEntryGroupsResponse(properties); - }; - - /** - * Encodes the specified ListEntryGroupsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntryGroupsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @static - * @param {google.cloud.datacatalog.v1.IListEntryGroupsResponse} message ListEntryGroupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryGroupsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entryGroups != null && message.entryGroups.length) - for (var i = 0; i < message.entryGroups.length; ++i) - $root.google.cloud.datacatalog.v1.EntryGroup.encode(message.entryGroups[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 ListEntryGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntryGroupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @static - * @param {google.cloud.datacatalog.v1.IListEntryGroupsResponse} message ListEntryGroupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntryGroupsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListEntryGroupsResponse} ListEntryGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryGroupsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListEntryGroupsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.entryGroups && message.entryGroups.length)) - message.entryGroups = []; - message.entryGroups.push($root.google.cloud.datacatalog.v1.EntryGroup.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntryGroupsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListEntryGroupsResponse} ListEntryGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryGroupsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntryGroupsResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntryGroupsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entryGroups != null && message.hasOwnProperty("entryGroups")) { - if (!Array.isArray(message.entryGroups)) - return "entryGroups: array expected"; - for (var i = 0; i < message.entryGroups.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.EntryGroup.verify(message.entryGroups[i]); - if (error) - return "entryGroups." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEntryGroupsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListEntryGroupsResponse} ListEntryGroupsResponse - */ - ListEntryGroupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListEntryGroupsResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListEntryGroupsResponse(); - if (object.entryGroups) { - if (!Array.isArray(object.entryGroups)) - throw TypeError(".google.cloud.datacatalog.v1.ListEntryGroupsResponse.entryGroups: array expected"); - message.entryGroups = []; - for (var i = 0; i < object.entryGroups.length; ++i) { - if (typeof object.entryGroups[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ListEntryGroupsResponse.entryGroups: object expected"); - message.entryGroups[i] = $root.google.cloud.datacatalog.v1.EntryGroup.fromObject(object.entryGroups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEntryGroupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @static - * @param {google.cloud.datacatalog.v1.ListEntryGroupsResponse} message ListEntryGroupsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntryGroupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entryGroups = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entryGroups && message.entryGroups.length) { - object.entryGroups = []; - for (var j = 0; j < message.entryGroups.length; ++j) - object.entryGroups[j] = $root.google.cloud.datacatalog.v1.EntryGroup.toObject(message.entryGroups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEntryGroupsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @instance - * @returns {Object.} JSON object - */ - ListEntryGroupsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntryGroupsResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListEntryGroupsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntryGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListEntryGroupsResponse"; - }; - - return ListEntryGroupsResponse; - })(); - - v1.CreateEntryRequest = (function() { - - /** - * Properties of a CreateEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ICreateEntryRequest - * @property {string|null} [parent] CreateEntryRequest parent - * @property {string|null} [entryId] CreateEntryRequest entryId - * @property {google.cloud.datacatalog.v1.IEntry|null} [entry] CreateEntryRequest entry - */ - - /** - * Constructs a new CreateEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CreateEntryRequest. - * @implements ICreateEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ICreateEntryRequest=} [properties] Properties to set - */ - function CreateEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEntryRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @instance - */ - CreateEntryRequest.prototype.parent = ""; - - /** - * CreateEntryRequest entryId. - * @member {string} entryId - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @instance - */ - CreateEntryRequest.prototype.entryId = ""; - - /** - * CreateEntryRequest entry. - * @member {google.cloud.datacatalog.v1.IEntry|null|undefined} entry - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @instance - */ - CreateEntryRequest.prototype.entry = null; - - /** - * Creates a new CreateEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CreateEntryRequest} CreateEntryRequest instance - */ - CreateEntryRequest.create = function create(properties) { - return new CreateEntryRequest(properties); - }; - - /** - * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateEntryRequest} message CreateEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryRequest.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.entry != null && Object.hasOwnProperty.call(message, "entry")) - $root.google.cloud.datacatalog.v1.Entry.encode(message.entry, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.entryId != null && Object.hasOwnProperty.call(message, "entryId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryId); - return writer; - }; - - /** - * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateEntryRequest} message CreateEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.CreateEntryRequest} CreateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.CreateEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.entryId = reader.string(); - break; - } - case 2: { - message.entry = $root.google.cloud.datacatalog.v1.Entry.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CreateEntryRequest} CreateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEntryRequest.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.entryId != null && message.hasOwnProperty("entryId")) - if (!$util.isString(message.entryId)) - return "entryId: string expected"; - if (message.entry != null && message.hasOwnProperty("entry")) { - var error = $root.google.cloud.datacatalog.v1.Entry.verify(message.entry); - if (error) - return "entry." + error; - } - return null; - }; - - /** - * Creates a CreateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CreateEntryRequest} CreateEntryRequest - */ - CreateEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CreateEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.CreateEntryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entryId != null) - message.entryId = String(object.entryId); - if (object.entry != null) { - if (typeof object.entry !== "object") - throw TypeError(".google.cloud.datacatalog.v1.CreateEntryRequest.entry: object expected"); - message.entry = $root.google.cloud.datacatalog.v1.Entry.fromObject(object.entry); - } - return message; - }; - - /** - * Creates a plain object from a CreateEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.CreateEntryRequest} message CreateEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEntryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.entry = null; - object.entryId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = $root.google.cloud.datacatalog.v1.Entry.toObject(message.entry, options); - if (message.entryId != null && message.hasOwnProperty("entryId")) - object.entryId = message.entryId; - return object; - }; - - /** - * Converts this CreateEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CreateEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CreateEntryRequest"; - }; - - return CreateEntryRequest; - })(); - - v1.UpdateEntryRequest = (function() { - - /** - * Properties of an UpdateEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IUpdateEntryRequest - * @property {google.cloud.datacatalog.v1.IEntry|null} [entry] UpdateEntryRequest entry - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryRequest updateMask - */ - - /** - * Constructs a new UpdateEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an UpdateEntryRequest. - * @implements IUpdateEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IUpdateEntryRequest=} [properties] Properties to set - */ - function UpdateEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEntryRequest entry. - * @member {google.cloud.datacatalog.v1.IEntry|null|undefined} entry - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @instance - */ - UpdateEntryRequest.prototype.entry = null; - - /** - * UpdateEntryRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @instance - */ - UpdateEntryRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UpdateEntryRequest} UpdateEntryRequest instance - */ - UpdateEntryRequest.create = function create(properties) { - return new UpdateEntryRequest(properties); - }; - - /** - * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateEntryRequest} message UpdateEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) - $root.google.cloud.datacatalog.v1.Entry.encode(message.entry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateEntryRequest} message UpdateEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UpdateEntryRequest} UpdateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UpdateEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entry = $root.google.cloud.datacatalog.v1.Entry.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UpdateEntryRequest} UpdateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEntryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entry != null && message.hasOwnProperty("entry")) { - var error = $root.google.cloud.datacatalog.v1.Entry.verify(message.entry); - if (error) - return "entry." + 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 UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UpdateEntryRequest} UpdateEntryRequest - */ - UpdateEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UpdateEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.UpdateEntryRequest(); - if (object.entry != null) { - if (typeof object.entry !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateEntryRequest.entry: object expected"); - message.entry = $root.google.cloud.datacatalog.v1.Entry.fromObject(object.entry); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateEntryRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.UpdateEntryRequest} message UpdateEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEntryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entry = null; - object.updateMask = null; - } - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = $root.google.cloud.datacatalog.v1.Entry.toObject(message.entry, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UpdateEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UpdateEntryRequest"; - }; - - return UpdateEntryRequest; - })(); - - v1.DeleteEntryRequest = (function() { - - /** - * Properties of a DeleteEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IDeleteEntryRequest - * @property {string|null} [name] DeleteEntryRequest name - */ - - /** - * Constructs a new DeleteEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DeleteEntryRequest. - * @implements IDeleteEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IDeleteEntryRequest=} [properties] Properties to set - */ - function DeleteEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEntryRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @instance - */ - DeleteEntryRequest.prototype.name = ""; - - /** - * Creates a new DeleteEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DeleteEntryRequest} DeleteEntryRequest instance - */ - DeleteEntryRequest.create = function create(properties) { - return new DeleteEntryRequest(properties); - }; - - /** - * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteEntryRequest} message DeleteEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryRequest.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 DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteEntryRequest} message DeleteEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DeleteEntryRequest} DeleteEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DeleteEntryRequest(); - 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 DeleteEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DeleteEntryRequest} DeleteEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEntryRequest.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 DeleteEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DeleteEntryRequest} DeleteEntryRequest - */ - DeleteEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DeleteEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.DeleteEntryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.DeleteEntryRequest} message DeleteEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEntryRequest.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 DeleteEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DeleteEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DeleteEntryRequest"; - }; - - return DeleteEntryRequest; - })(); - - v1.GetEntryRequest = (function() { - - /** - * Properties of a GetEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IGetEntryRequest - * @property {string|null} [name] GetEntryRequest name - */ - - /** - * Constructs a new GetEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a GetEntryRequest. - * @implements IGetEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IGetEntryRequest=} [properties] Properties to set - */ - function GetEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEntryRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @instance - */ - GetEntryRequest.prototype.name = ""; - - /** - * Creates a new GetEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.GetEntryRequest} GetEntryRequest instance - */ - GetEntryRequest.create = function create(properties) { - return new GetEntryRequest(properties); - }; - - /** - * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetEntryRequest} message GetEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryRequest.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 GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetEntryRequest} message GetEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.GetEntryRequest} GetEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.GetEntryRequest(); - 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 GetEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.GetEntryRequest} GetEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEntryRequest.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 GetEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.GetEntryRequest} GetEntryRequest - */ - GetEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.GetEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.GetEntryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.GetEntryRequest} message GetEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEntryRequest.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 GetEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @instance - * @returns {Object.} JSON object - */ - GetEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.GetEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.GetEntryRequest"; - }; - - return GetEntryRequest; - })(); - - v1.LookupEntryRequest = (function() { - - /** - * Properties of a LookupEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ILookupEntryRequest - * @property {string|null} [linkedResource] LookupEntryRequest linkedResource - * @property {string|null} [sqlResource] LookupEntryRequest sqlResource - * @property {string|null} [fullyQualifiedName] LookupEntryRequest fullyQualifiedName - */ - - /** - * Constructs a new LookupEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a LookupEntryRequest. - * @implements ILookupEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ILookupEntryRequest=} [properties] Properties to set - */ - function LookupEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LookupEntryRequest linkedResource. - * @member {string|null|undefined} linkedResource - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.linkedResource = null; - - /** - * LookupEntryRequest sqlResource. - * @member {string|null|undefined} sqlResource - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.sqlResource = null; - - /** - * LookupEntryRequest fullyQualifiedName. - * @member {string|null|undefined} fullyQualifiedName - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.fullyQualifiedName = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LookupEntryRequest targetName. - * @member {"linkedResource"|"sqlResource"|"fullyQualifiedName"|undefined} targetName - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @instance - */ - Object.defineProperty(LookupEntryRequest.prototype, "targetName", { - get: $util.oneOfGetter($oneOfFields = ["linkedResource", "sqlResource", "fullyQualifiedName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LookupEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.ILookupEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.LookupEntryRequest} LookupEntryRequest instance - */ - LookupEntryRequest.create = function create(properties) { - return new LookupEntryRequest(properties); - }; - - /** - * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.LookupEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.ILookupEntryRequest} message LookupEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookupEntryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.linkedResource); - if (message.sqlResource != null && Object.hasOwnProperty.call(message, "sqlResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sqlResource); - if (message.fullyQualifiedName != null && Object.hasOwnProperty.call(message, "fullyQualifiedName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.fullyQualifiedName); - return writer; - }; - - /** - * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.LookupEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.ILookupEntryRequest} message LookupEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookupEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LookupEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.LookupEntryRequest} LookupEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookupEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.LookupEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.linkedResource = reader.string(); - break; - } - case 3: { - message.sqlResource = reader.string(); - break; - } - case 5: { - message.fullyQualifiedName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LookupEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.LookupEntryRequest} LookupEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookupEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LookupEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LookupEntryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) { - properties.targetName = 1; - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; - } - if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) { - if (properties.targetName === 1) - return "targetName: multiple values"; - properties.targetName = 1; - if (!$util.isString(message.sqlResource)) - return "sqlResource: string expected"; - } - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) { - if (properties.targetName === 1) - return "targetName: multiple values"; - properties.targetName = 1; - if (!$util.isString(message.fullyQualifiedName)) - return "fullyQualifiedName: string expected"; - } - return null; - }; - - /** - * Creates a LookupEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.LookupEntryRequest} LookupEntryRequest - */ - LookupEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.LookupEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.LookupEntryRequest(); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - if (object.sqlResource != null) - message.sqlResource = String(object.sqlResource); - if (object.fullyQualifiedName != null) - message.fullyQualifiedName = String(object.fullyQualifiedName); - return message; - }; - - /** - * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.LookupEntryRequest} message LookupEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LookupEntryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) { - object.linkedResource = message.linkedResource; - if (options.oneofs) - object.targetName = "linkedResource"; - } - if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) { - object.sqlResource = message.sqlResource; - if (options.oneofs) - object.targetName = "sqlResource"; - } - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) { - object.fullyQualifiedName = message.fullyQualifiedName; - if (options.oneofs) - object.targetName = "fullyQualifiedName"; - } - return object; - }; - - /** - * Converts this LookupEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @instance - * @returns {Object.} JSON object - */ - LookupEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LookupEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.LookupEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LookupEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.LookupEntryRequest"; - }; - - return LookupEntryRequest; - })(); - - v1.Entry = (function() { - - /** - * Properties of an Entry. - * @memberof google.cloud.datacatalog.v1 - * @interface IEntry - * @property {string|null} [name] Entry name - * @property {string|null} [linkedResource] Entry linkedResource - * @property {string|null} [fullyQualifiedName] Entry fullyQualifiedName - * @property {google.cloud.datacatalog.v1.EntryType|null} [type] Entry type - * @property {string|null} [userSpecifiedType] Entry userSpecifiedType - * @property {google.cloud.datacatalog.v1.IntegratedSystem|null} [integratedSystem] Entry integratedSystem - * @property {string|null} [userSpecifiedSystem] Entry userSpecifiedSystem - * @property {google.cloud.datacatalog.v1.IGcsFilesetSpec|null} [gcsFilesetSpec] Entry gcsFilesetSpec - * @property {google.cloud.datacatalog.v1.IBigQueryTableSpec|null} [bigqueryTableSpec] Entry bigqueryTableSpec - * @property {google.cloud.datacatalog.v1.IBigQueryDateShardedSpec|null} [bigqueryDateShardedSpec] Entry bigqueryDateShardedSpec - * @property {google.cloud.datacatalog.v1.IDatabaseTableSpec|null} [databaseTableSpec] Entry databaseTableSpec - * @property {google.cloud.datacatalog.v1.IDataSourceConnectionSpec|null} [dataSourceConnectionSpec] Entry dataSourceConnectionSpec - * @property {google.cloud.datacatalog.v1.IRoutineSpec|null} [routineSpec] Entry routineSpec - * @property {google.cloud.datacatalog.v1.IFilesetSpec|null} [filesetSpec] Entry filesetSpec - * @property {string|null} [displayName] Entry displayName - * @property {string|null} [description] Entry description - * @property {google.cloud.datacatalog.v1.IBusinessContext|null} [businessContext] Entry businessContext - * @property {google.cloud.datacatalog.v1.ISchema|null} [schema] Entry schema - * @property {google.cloud.datacatalog.v1.ISystemTimestamps|null} [sourceSystemTimestamps] Entry sourceSystemTimestamps - * @property {google.cloud.datacatalog.v1.IUsageSignal|null} [usageSignal] Entry usageSignal - * @property {Object.|null} [labels] Entry labels - * @property {google.cloud.datacatalog.v1.IDataSource|null} [dataSource] Entry dataSource - * @property {google.cloud.datacatalog.v1.IPersonalDetails|null} [personalDetails] Entry personalDetails - */ - - /** - * Constructs a new Entry. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an Entry. - * @implements IEntry - * @constructor - * @param {google.cloud.datacatalog.v1.IEntry=} [properties] Properties to set - */ - function Entry(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]]; - } - - /** - * Entry name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.name = ""; - - /** - * Entry linkedResource. - * @member {string} linkedResource - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.linkedResource = ""; - - /** - * Entry fullyQualifiedName. - * @member {string} fullyQualifiedName - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.fullyQualifiedName = ""; - - /** - * Entry type. - * @member {google.cloud.datacatalog.v1.EntryType|null|undefined} type - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.type = null; - - /** - * Entry userSpecifiedType. - * @member {string|null|undefined} userSpecifiedType - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.userSpecifiedType = null; - - /** - * Entry integratedSystem. - * @member {google.cloud.datacatalog.v1.IntegratedSystem|null|undefined} integratedSystem - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.integratedSystem = null; - - /** - * Entry userSpecifiedSystem. - * @member {string|null|undefined} userSpecifiedSystem - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.userSpecifiedSystem = null; - - /** - * Entry gcsFilesetSpec. - * @member {google.cloud.datacatalog.v1.IGcsFilesetSpec|null|undefined} gcsFilesetSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.gcsFilesetSpec = null; - - /** - * Entry bigqueryTableSpec. - * @member {google.cloud.datacatalog.v1.IBigQueryTableSpec|null|undefined} bigqueryTableSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.bigqueryTableSpec = null; - - /** - * Entry bigqueryDateShardedSpec. - * @member {google.cloud.datacatalog.v1.IBigQueryDateShardedSpec|null|undefined} bigqueryDateShardedSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.bigqueryDateShardedSpec = null; - - /** - * Entry databaseTableSpec. - * @member {google.cloud.datacatalog.v1.IDatabaseTableSpec|null|undefined} databaseTableSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.databaseTableSpec = null; - - /** - * Entry dataSourceConnectionSpec. - * @member {google.cloud.datacatalog.v1.IDataSourceConnectionSpec|null|undefined} dataSourceConnectionSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.dataSourceConnectionSpec = null; - - /** - * Entry routineSpec. - * @member {google.cloud.datacatalog.v1.IRoutineSpec|null|undefined} routineSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.routineSpec = null; - - /** - * Entry filesetSpec. - * @member {google.cloud.datacatalog.v1.IFilesetSpec|null|undefined} filesetSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.filesetSpec = null; - - /** - * Entry displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.displayName = ""; - - /** - * Entry description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.description = ""; - - /** - * Entry businessContext. - * @member {google.cloud.datacatalog.v1.IBusinessContext|null|undefined} businessContext - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.businessContext = null; - - /** - * Entry schema. - * @member {google.cloud.datacatalog.v1.ISchema|null|undefined} schema - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.schema = null; - - /** - * Entry sourceSystemTimestamps. - * @member {google.cloud.datacatalog.v1.ISystemTimestamps|null|undefined} sourceSystemTimestamps - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.sourceSystemTimestamps = null; - - /** - * Entry usageSignal. - * @member {google.cloud.datacatalog.v1.IUsageSignal|null|undefined} usageSignal - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.usageSignal = null; - - /** - * Entry labels. - * @member {Object.} labels - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.labels = $util.emptyObject; - - /** - * Entry dataSource. - * @member {google.cloud.datacatalog.v1.IDataSource|null|undefined} dataSource - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.dataSource = null; - - /** - * Entry personalDetails. - * @member {google.cloud.datacatalog.v1.IPersonalDetails|null|undefined} personalDetails - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Entry.prototype.personalDetails = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Entry entryType. - * @member {"type"|"userSpecifiedType"|undefined} entryType - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "entryType", { - get: $util.oneOfGetter($oneOfFields = ["type", "userSpecifiedType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Entry system. - * @member {"integratedSystem"|"userSpecifiedSystem"|undefined} system - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "system", { - get: $util.oneOfGetter($oneOfFields = ["integratedSystem", "userSpecifiedSystem"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Entry typeSpec. - * @member {"gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"|undefined} typeSpec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "typeSpec", { - get: $util.oneOfGetter($oneOfFields = ["gcsFilesetSpec", "bigqueryTableSpec", "bigqueryDateShardedSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Entry spec. - * @member {"databaseTableSpec"|"dataSourceConnectionSpec"|"routineSpec"|"filesetSpec"|undefined} spec - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "spec", { - get: $util.oneOfGetter($oneOfFields = ["databaseTableSpec", "dataSourceConnectionSpec", "routineSpec", "filesetSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Entry instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.Entry - * @static - * @param {google.cloud.datacatalog.v1.IEntry=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.Entry} Entry instance - */ - Entry.create = function create(properties) { - return new Entry(properties); - }; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.datacatalog.v1.Entry.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.Entry - * @static - * @param {google.cloud.datacatalog.v1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.cloud.datacatalog.v1.Schema.encode(message.schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.gcsFilesetSpec != null && Object.hasOwnProperty.call(message, "gcsFilesetSpec")) - $root.google.cloud.datacatalog.v1.GcsFilesetSpec.encode(message.gcsFilesetSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.sourceSystemTimestamps != null && Object.hasOwnProperty.call(message, "sourceSystemTimestamps")) - $root.google.cloud.datacatalog.v1.SystemTimestamps.encode(message.sourceSystemTimestamps, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.linkedResource); - if (message.bigqueryTableSpec != null && Object.hasOwnProperty.call(message, "bigqueryTableSpec")) - $root.google.cloud.datacatalog.v1.BigQueryTableSpec.encode(message.bigqueryTableSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.usageSignal != null && Object.hasOwnProperty.call(message, "usageSignal")) - $root.google.cloud.datacatalog.v1.UsageSignal.encode(message.usageSignal, writer.uint32(/* id 13, wireType 2 =*/106).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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.bigqueryDateShardedSpec != null && Object.hasOwnProperty.call(message, "bigqueryDateShardedSpec")) - $root.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.encode(message.bigqueryDateShardedSpec, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.userSpecifiedType != null && Object.hasOwnProperty.call(message, "userSpecifiedType")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.userSpecifiedType); - if (message.integratedSystem != null && Object.hasOwnProperty.call(message, "integratedSystem")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.integratedSystem); - if (message.userSpecifiedSystem != null && Object.hasOwnProperty.call(message, "userSpecifiedSystem")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.userSpecifiedSystem); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - $root.google.cloud.datacatalog.v1.DataSource.encode(message.dataSource, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.databaseTableSpec != null && Object.hasOwnProperty.call(message, "databaseTableSpec")) - $root.google.cloud.datacatalog.v1.DatabaseTableSpec.encode(message.databaseTableSpec, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.personalDetails != null && Object.hasOwnProperty.call(message, "personalDetails")) - $root.google.cloud.datacatalog.v1.PersonalDetails.encode(message.personalDetails, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.dataSourceConnectionSpec != null && Object.hasOwnProperty.call(message, "dataSourceConnectionSpec")) - $root.google.cloud.datacatalog.v1.DataSourceConnectionSpec.encode(message.dataSourceConnectionSpec, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.routineSpec != null && Object.hasOwnProperty.call(message, "routineSpec")) - $root.google.cloud.datacatalog.v1.RoutineSpec.encode(message.routineSpec, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.fullyQualifiedName != null && Object.hasOwnProperty.call(message, "fullyQualifiedName")) - writer.uint32(/* id 29, wireType 2 =*/234).string(message.fullyQualifiedName); - if (message.filesetSpec != null && Object.hasOwnProperty.call(message, "filesetSpec")) - $root.google.cloud.datacatalog.v1.FilesetSpec.encode(message.filesetSpec, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); - if (message.businessContext != null && Object.hasOwnProperty.call(message, "businessContext")) - $root.google.cloud.datacatalog.v1.BusinessContext.encode(message.businessContext, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Entry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.Entry - * @static - * @param {google.cloud.datacatalog.v1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.Entry(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 9: { - message.linkedResource = reader.string(); - break; - } - case 29: { - message.fullyQualifiedName = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - case 16: { - message.userSpecifiedType = reader.string(); - break; - } - case 17: { - message.integratedSystem = reader.int32(); - break; - } - case 18: { - message.userSpecifiedSystem = reader.string(); - break; - } - case 6: { - message.gcsFilesetSpec = $root.google.cloud.datacatalog.v1.GcsFilesetSpec.decode(reader, reader.uint32()); - break; - } - case 12: { - message.bigqueryTableSpec = $root.google.cloud.datacatalog.v1.BigQueryTableSpec.decode(reader, reader.uint32()); - break; - } - case 15: { - message.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.decode(reader, reader.uint32()); - break; - } - case 24: { - message.databaseTableSpec = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.decode(reader, reader.uint32()); - break; - } - case 27: { - message.dataSourceConnectionSpec = $root.google.cloud.datacatalog.v1.DataSourceConnectionSpec.decode(reader, reader.uint32()); - break; - } - case 28: { - message.routineSpec = $root.google.cloud.datacatalog.v1.RoutineSpec.decode(reader, reader.uint32()); - break; - } - case 33: { - message.filesetSpec = $root.google.cloud.datacatalog.v1.FilesetSpec.decode(reader, reader.uint32()); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 37: { - message.businessContext = $root.google.cloud.datacatalog.v1.BusinessContext.decode(reader, reader.uint32()); - break; - } - case 5: { - message.schema = $root.google.cloud.datacatalog.v1.Schema.decode(reader, reader.uint32()); - break; - } - case 7: { - message.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.decode(reader, reader.uint32()); - break; - } - case 13: { - message.usageSignal = $root.google.cloud.datacatalog.v1.UsageSignal.decode(reader, reader.uint32()); - break; - } - case 14: { - 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 20: { - message.dataSource = $root.google.cloud.datacatalog.v1.DataSource.decode(reader, reader.uint32()); - break; - } - case 26: { - message.personalDetails = $root.google.cloud.datacatalog.v1.PersonalDetails.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entry message. - * @function verify - * @memberof google.cloud.datacatalog.v1.Entry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entry.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.linkedResource != null && message.hasOwnProperty("linkedResource")) - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) - if (!$util.isString(message.fullyQualifiedName)) - return "fullyQualifiedName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { - properties.entryType = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 2: - case 5: - case 3: - case 4: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 14: - break; - } - } - if (message.userSpecifiedType != null && message.hasOwnProperty("userSpecifiedType")) { - if (properties.entryType === 1) - return "entryType: multiple values"; - properties.entryType = 1; - if (!$util.isString(message.userSpecifiedType)) - return "userSpecifiedType: string expected"; - } - if (message.integratedSystem != null && message.hasOwnProperty("integratedSystem")) { - properties.system = 1; - switch (message.integratedSystem) { - default: - return "integratedSystem: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.userSpecifiedSystem != null && message.hasOwnProperty("userSpecifiedSystem")) { - if (properties.system === 1) - return "system: multiple values"; - properties.system = 1; - if (!$util.isString(message.userSpecifiedSystem)) - return "userSpecifiedSystem: string expected"; - } - if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) { - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.GcsFilesetSpec.verify(message.gcsFilesetSpec); - if (error) - return "gcsFilesetSpec." + error; - } - } - if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) { - if (properties.typeSpec === 1) - return "typeSpec: multiple values"; - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.BigQueryTableSpec.verify(message.bigqueryTableSpec); - if (error) - return "bigqueryTableSpec." + error; - } - } - if (message.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) { - if (properties.typeSpec === 1) - return "typeSpec: multiple values"; - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.verify(message.bigqueryDateShardedSpec); - if (error) - return "bigqueryDateShardedSpec." + error; - } - } - if (message.databaseTableSpec != null && message.hasOwnProperty("databaseTableSpec")) { - properties.spec = 1; - { - var error = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.verify(message.databaseTableSpec); - if (error) - return "databaseTableSpec." + error; - } - } - if (message.dataSourceConnectionSpec != null && message.hasOwnProperty("dataSourceConnectionSpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.datacatalog.v1.DataSourceConnectionSpec.verify(message.dataSourceConnectionSpec); - if (error) - return "dataSourceConnectionSpec." + error; - } - } - if (message.routineSpec != null && message.hasOwnProperty("routineSpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.datacatalog.v1.RoutineSpec.verify(message.routineSpec); - if (error) - return "routineSpec." + error; - } - } - if (message.filesetSpec != null && message.hasOwnProperty("filesetSpec")) { - if (properties.spec === 1) - return "spec: multiple values"; - properties.spec = 1; - { - var error = $root.google.cloud.datacatalog.v1.FilesetSpec.verify(message.filesetSpec); - if (error) - return "filesetSpec." + error; - } - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.businessContext != null && message.hasOwnProperty("businessContext")) { - var error = $root.google.cloud.datacatalog.v1.BusinessContext.verify(message.businessContext); - if (error) - return "businessContext." + error; - } - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.google.cloud.datacatalog.v1.Schema.verify(message.schema); - if (error) - return "schema." + error; - } - if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) { - var error = $root.google.cloud.datacatalog.v1.SystemTimestamps.verify(message.sourceSystemTimestamps); - if (error) - return "sourceSystemTimestamps." + error; - } - if (message.usageSignal != null && message.hasOwnProperty("usageSignal")) { - var error = $root.google.cloud.datacatalog.v1.UsageSignal.verify(message.usageSignal); - if (error) - return "usageSignal." + 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.dataSource != null && message.hasOwnProperty("dataSource")) { - var error = $root.google.cloud.datacatalog.v1.DataSource.verify(message.dataSource); - if (error) - return "dataSource." + error; - } - if (message.personalDetails != null && message.hasOwnProperty("personalDetails")) { - var error = $root.google.cloud.datacatalog.v1.PersonalDetails.verify(message.personalDetails); - if (error) - return "personalDetails." + error; - } - return null; - }; - - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.Entry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.Entry} Entry - */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.Entry) - return object; - var message = new $root.google.cloud.datacatalog.v1.Entry(); - if (object.name != null) - message.name = String(object.name); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - if (object.fullyQualifiedName != null) - message.fullyQualifiedName = String(object.fullyQualifiedName); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "ENTRY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 2: - message.type = 2; - break; - case "MODEL": - case 5: - message.type = 5; - break; - case "DATA_STREAM": - case 3: - message.type = 3; - break; - case "FILESET": - case 4: - message.type = 4; - break; - case "CLUSTER": - case 6: - message.type = 6; - break; - case "DATABASE": - case 7: - message.type = 7; - break; - case "DATA_SOURCE_CONNECTION": - case 8: - message.type = 8; - break; - case "ROUTINE": - case 9: - message.type = 9; - break; - case "LAKE": - case 10: - message.type = 10; - break; - case "ZONE": - case 11: - message.type = 11; - break; - case "SERVICE": - case 14: - message.type = 14; - break; - } - if (object.userSpecifiedType != null) - message.userSpecifiedType = String(object.userSpecifiedType); - switch (object.integratedSystem) { - default: - if (typeof object.integratedSystem === "number") { - message.integratedSystem = object.integratedSystem; - break; - } - break; - case "INTEGRATED_SYSTEM_UNSPECIFIED": - case 0: - message.integratedSystem = 0; - break; - case "BIGQUERY": - case 1: - message.integratedSystem = 1; - break; - case "CLOUD_PUBSUB": - case 2: - message.integratedSystem = 2; - break; - case "DATAPROC_METASTORE": - case 3: - message.integratedSystem = 3; - break; - case "DATAPLEX": - case 4: - message.integratedSystem = 4; - break; - } - if (object.userSpecifiedSystem != null) - message.userSpecifiedSystem = String(object.userSpecifiedSystem); - if (object.gcsFilesetSpec != null) { - if (typeof object.gcsFilesetSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.gcsFilesetSpec: object expected"); - message.gcsFilesetSpec = $root.google.cloud.datacatalog.v1.GcsFilesetSpec.fromObject(object.gcsFilesetSpec); - } - if (object.bigqueryTableSpec != null) { - if (typeof object.bigqueryTableSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.bigqueryTableSpec: object expected"); - message.bigqueryTableSpec = $root.google.cloud.datacatalog.v1.BigQueryTableSpec.fromObject(object.bigqueryTableSpec); - } - if (object.bigqueryDateShardedSpec != null) { - if (typeof object.bigqueryDateShardedSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.bigqueryDateShardedSpec: object expected"); - message.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.fromObject(object.bigqueryDateShardedSpec); - } - if (object.databaseTableSpec != null) { - if (typeof object.databaseTableSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.databaseTableSpec: object expected"); - message.databaseTableSpec = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.fromObject(object.databaseTableSpec); - } - if (object.dataSourceConnectionSpec != null) { - if (typeof object.dataSourceConnectionSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.dataSourceConnectionSpec: object expected"); - message.dataSourceConnectionSpec = $root.google.cloud.datacatalog.v1.DataSourceConnectionSpec.fromObject(object.dataSourceConnectionSpec); - } - if (object.routineSpec != null) { - if (typeof object.routineSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.routineSpec: object expected"); - message.routineSpec = $root.google.cloud.datacatalog.v1.RoutineSpec.fromObject(object.routineSpec); - } - if (object.filesetSpec != null) { - if (typeof object.filesetSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.filesetSpec: object expected"); - message.filesetSpec = $root.google.cloud.datacatalog.v1.FilesetSpec.fromObject(object.filesetSpec); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.businessContext != null) { - if (typeof object.businessContext !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.businessContext: object expected"); - message.businessContext = $root.google.cloud.datacatalog.v1.BusinessContext.fromObject(object.businessContext); - } - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.schema: object expected"); - message.schema = $root.google.cloud.datacatalog.v1.Schema.fromObject(object.schema); - } - if (object.sourceSystemTimestamps != null) { - if (typeof object.sourceSystemTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.sourceSystemTimestamps: object expected"); - message.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.fromObject(object.sourceSystemTimestamps); - } - if (object.usageSignal != null) { - if (typeof object.usageSignal !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.usageSignal: object expected"); - message.usageSignal = $root.google.cloud.datacatalog.v1.UsageSignal.fromObject(object.usageSignal); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.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.dataSource != null) { - if (typeof object.dataSource !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.dataSource: object expected"); - message.dataSource = $root.google.cloud.datacatalog.v1.DataSource.fromObject(object.dataSource); - } - if (object.personalDetails != null) { - if (typeof object.personalDetails !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Entry.personalDetails: object expected"); - message.personalDetails = $root.google.cloud.datacatalog.v1.PersonalDetails.fromObject(object.personalDetails); - } - return message; - }; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.Entry - * @static - * @param {google.cloud.datacatalog.v1.Entry} message Entry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.schema = null; - object.sourceSystemTimestamps = null; - object.linkedResource = ""; - object.usageSignal = null; - object.dataSource = null; - object.personalDetails = null; - object.fullyQualifiedName = ""; - object.businessContext = 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.datacatalog.v1.EntryType[message.type] === undefined ? message.type : $root.google.cloud.datacatalog.v1.EntryType[message.type] : message.type; - if (options.oneofs) - object.entryType = "type"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.google.cloud.datacatalog.v1.Schema.toObject(message.schema, options); - if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) { - object.gcsFilesetSpec = $root.google.cloud.datacatalog.v1.GcsFilesetSpec.toObject(message.gcsFilesetSpec, options); - if (options.oneofs) - object.typeSpec = "gcsFilesetSpec"; - } - if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) - object.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.toObject(message.sourceSystemTimestamps, options); - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - object.linkedResource = message.linkedResource; - if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) { - object.bigqueryTableSpec = $root.google.cloud.datacatalog.v1.BigQueryTableSpec.toObject(message.bigqueryTableSpec, options); - if (options.oneofs) - object.typeSpec = "bigqueryTableSpec"; - } - if (message.usageSignal != null && message.hasOwnProperty("usageSignal")) - object.usageSignal = $root.google.cloud.datacatalog.v1.UsageSignal.toObject(message.usageSignal, 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.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) { - object.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1.BigQueryDateShardedSpec.toObject(message.bigqueryDateShardedSpec, options); - if (options.oneofs) - object.typeSpec = "bigqueryDateShardedSpec"; - } - if (message.userSpecifiedType != null && message.hasOwnProperty("userSpecifiedType")) { - object.userSpecifiedType = message.userSpecifiedType; - if (options.oneofs) - object.entryType = "userSpecifiedType"; - } - if (message.integratedSystem != null && message.hasOwnProperty("integratedSystem")) { - object.integratedSystem = options.enums === String ? $root.google.cloud.datacatalog.v1.IntegratedSystem[message.integratedSystem] === undefined ? message.integratedSystem : $root.google.cloud.datacatalog.v1.IntegratedSystem[message.integratedSystem] : message.integratedSystem; - if (options.oneofs) - object.system = "integratedSystem"; - } - if (message.userSpecifiedSystem != null && message.hasOwnProperty("userSpecifiedSystem")) { - object.userSpecifiedSystem = message.userSpecifiedSystem; - if (options.oneofs) - object.system = "userSpecifiedSystem"; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = $root.google.cloud.datacatalog.v1.DataSource.toObject(message.dataSource, options); - if (message.databaseTableSpec != null && message.hasOwnProperty("databaseTableSpec")) { - object.databaseTableSpec = $root.google.cloud.datacatalog.v1.DatabaseTableSpec.toObject(message.databaseTableSpec, options); - if (options.oneofs) - object.spec = "databaseTableSpec"; - } - if (message.personalDetails != null && message.hasOwnProperty("personalDetails")) - object.personalDetails = $root.google.cloud.datacatalog.v1.PersonalDetails.toObject(message.personalDetails, options); - if (message.dataSourceConnectionSpec != null && message.hasOwnProperty("dataSourceConnectionSpec")) { - object.dataSourceConnectionSpec = $root.google.cloud.datacatalog.v1.DataSourceConnectionSpec.toObject(message.dataSourceConnectionSpec, options); - if (options.oneofs) - object.spec = "dataSourceConnectionSpec"; - } - if (message.routineSpec != null && message.hasOwnProperty("routineSpec")) { - object.routineSpec = $root.google.cloud.datacatalog.v1.RoutineSpec.toObject(message.routineSpec, options); - if (options.oneofs) - object.spec = "routineSpec"; - } - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) - object.fullyQualifiedName = message.fullyQualifiedName; - if (message.filesetSpec != null && message.hasOwnProperty("filesetSpec")) { - object.filesetSpec = $root.google.cloud.datacatalog.v1.FilesetSpec.toObject(message.filesetSpec, options); - if (options.oneofs) - object.spec = "filesetSpec"; - } - if (message.businessContext != null && message.hasOwnProperty("businessContext")) - object.businessContext = $root.google.cloud.datacatalog.v1.BusinessContext.toObject(message.businessContext, options); - return object; - }; - - /** - * Converts this Entry to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.Entry - * @instance - * @returns {Object.} JSON object - */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Entry - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.Entry - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.Entry"; - }; - - return Entry; - })(); - - v1.DatabaseTableSpec = (function() { - - /** - * Properties of a DatabaseTableSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IDatabaseTableSpec - * @property {google.cloud.datacatalog.v1.DatabaseTableSpec.TableType|null} [type] DatabaseTableSpec type - * @property {google.cloud.datacatalog.v1.IDataplexTableSpec|null} [dataplexTable] DatabaseTableSpec dataplexTable - */ - - /** - * Constructs a new DatabaseTableSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DatabaseTableSpec. - * @implements IDatabaseTableSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IDatabaseTableSpec=} [properties] Properties to set - */ - function DatabaseTableSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatabaseTableSpec type. - * @member {google.cloud.datacatalog.v1.DatabaseTableSpec.TableType} type - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @instance - */ - DatabaseTableSpec.prototype.type = 0; - - /** - * DatabaseTableSpec dataplexTable. - * @member {google.cloud.datacatalog.v1.IDataplexTableSpec|null|undefined} dataplexTable - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @instance - */ - DatabaseTableSpec.prototype.dataplexTable = null; - - /** - * Creates a new DatabaseTableSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @static - * @param {google.cloud.datacatalog.v1.IDatabaseTableSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec} DatabaseTableSpec instance - */ - DatabaseTableSpec.create = function create(properties) { - return new DatabaseTableSpec(properties); - }; - - /** - * Encodes the specified DatabaseTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @static - * @param {google.cloud.datacatalog.v1.IDatabaseTableSpec} message DatabaseTableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseTableSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.dataplexTable != null && Object.hasOwnProperty.call(message, "dataplexTable")) - $root.google.cloud.datacatalog.v1.DataplexTableSpec.encode(message.dataplexTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DatabaseTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DatabaseTableSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @static - * @param {google.cloud.datacatalog.v1.IDatabaseTableSpec} message DatabaseTableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseTableSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseTableSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec} DatabaseTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseTableSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DatabaseTableSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.dataplexTable = $root.google.cloud.datacatalog.v1.DataplexTableSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseTableSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec} DatabaseTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseTableSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseTableSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseTableSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.dataplexTable != null && message.hasOwnProperty("dataplexTable")) { - var error = $root.google.cloud.datacatalog.v1.DataplexTableSpec.verify(message.dataplexTable); - if (error) - return "dataplexTable." + error; - } - return null; - }; - - /** - * Creates a DatabaseTableSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DatabaseTableSpec} DatabaseTableSpec - */ - DatabaseTableSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DatabaseTableSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.DatabaseTableSpec(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TABLE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "NATIVE": - case 1: - message.type = 1; - break; - case "EXTERNAL": - case 2: - message.type = 2; - break; - } - if (object.dataplexTable != null) { - if (typeof object.dataplexTable !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DatabaseTableSpec.dataplexTable: object expected"); - message.dataplexTable = $root.google.cloud.datacatalog.v1.DataplexTableSpec.fromObject(object.dataplexTable); - } - return message; - }; - - /** - * Creates a plain object from a DatabaseTableSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @static - * @param {google.cloud.datacatalog.v1.DatabaseTableSpec} message DatabaseTableSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseTableSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TABLE_TYPE_UNSPECIFIED" : 0; - object.dataplexTable = null; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType[message.type] === undefined ? message.type : $root.google.cloud.datacatalog.v1.DatabaseTableSpec.TableType[message.type] : message.type; - if (message.dataplexTable != null && message.hasOwnProperty("dataplexTable")) - object.dataplexTable = $root.google.cloud.datacatalog.v1.DataplexTableSpec.toObject(message.dataplexTable, options); - return object; - }; - - /** - * Converts this DatabaseTableSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @instance - * @returns {Object.} JSON object - */ - DatabaseTableSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseTableSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DatabaseTableSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseTableSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DatabaseTableSpec"; - }; - - /** - * TableType enum. - * @name google.cloud.datacatalog.v1.DatabaseTableSpec.TableType - * @enum {number} - * @property {number} TABLE_TYPE_UNSPECIFIED=0 TABLE_TYPE_UNSPECIFIED value - * @property {number} NATIVE=1 NATIVE value - * @property {number} EXTERNAL=2 EXTERNAL value - */ - DatabaseTableSpec.TableType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TABLE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NATIVE"] = 1; - values[valuesById[2] = "EXTERNAL"] = 2; - return values; - })(); - - return DatabaseTableSpec; - })(); - - v1.FilesetSpec = (function() { - - /** - * Properties of a FilesetSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IFilesetSpec - * @property {google.cloud.datacatalog.v1.IDataplexFilesetSpec|null} [dataplexFileset] FilesetSpec dataplexFileset - */ - - /** - * Constructs a new FilesetSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a FilesetSpec. - * @implements IFilesetSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IFilesetSpec=} [properties] Properties to set - */ - function FilesetSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FilesetSpec dataplexFileset. - * @member {google.cloud.datacatalog.v1.IDataplexFilesetSpec|null|undefined} dataplexFileset - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @instance - */ - FilesetSpec.prototype.dataplexFileset = null; - - /** - * Creates a new FilesetSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.IFilesetSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.FilesetSpec} FilesetSpec instance - */ - FilesetSpec.create = function create(properties) { - return new FilesetSpec(properties); - }; - - /** - * Encodes the specified FilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.FilesetSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.IFilesetSpec} message FilesetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilesetSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataplexFileset != null && Object.hasOwnProperty.call(message, "dataplexFileset")) - $root.google.cloud.datacatalog.v1.DataplexFilesetSpec.encode(message.dataplexFileset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FilesetSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.IFilesetSpec} message FilesetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilesetSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FilesetSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.FilesetSpec} FilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilesetSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.FilesetSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataplexFileset = $root.google.cloud.datacatalog.v1.DataplexFilesetSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FilesetSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.FilesetSpec} FilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilesetSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FilesetSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FilesetSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataplexFileset != null && message.hasOwnProperty("dataplexFileset")) { - var error = $root.google.cloud.datacatalog.v1.DataplexFilesetSpec.verify(message.dataplexFileset); - if (error) - return "dataplexFileset." + error; - } - return null; - }; - - /** - * Creates a FilesetSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.FilesetSpec} FilesetSpec - */ - FilesetSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.FilesetSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.FilesetSpec(); - if (object.dataplexFileset != null) { - if (typeof object.dataplexFileset !== "object") - throw TypeError(".google.cloud.datacatalog.v1.FilesetSpec.dataplexFileset: object expected"); - message.dataplexFileset = $root.google.cloud.datacatalog.v1.DataplexFilesetSpec.fromObject(object.dataplexFileset); - } - return message; - }; - - /** - * Creates a plain object from a FilesetSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.FilesetSpec} message FilesetSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FilesetSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dataplexFileset = null; - if (message.dataplexFileset != null && message.hasOwnProperty("dataplexFileset")) - object.dataplexFileset = $root.google.cloud.datacatalog.v1.DataplexFilesetSpec.toObject(message.dataplexFileset, options); - return object; - }; - - /** - * Converts this FilesetSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @instance - * @returns {Object.} JSON object - */ - FilesetSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FilesetSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.FilesetSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FilesetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.FilesetSpec"; - }; - - return FilesetSpec; - })(); - - v1.DataSourceConnectionSpec = (function() { - - /** - * Properties of a DataSourceConnectionSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IDataSourceConnectionSpec - * @property {google.cloud.datacatalog.v1.IBigQueryConnectionSpec|null} [bigqueryConnectionSpec] DataSourceConnectionSpec bigqueryConnectionSpec - */ - - /** - * Constructs a new DataSourceConnectionSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DataSourceConnectionSpec. - * @implements IDataSourceConnectionSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IDataSourceConnectionSpec=} [properties] Properties to set - */ - function DataSourceConnectionSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataSourceConnectionSpec bigqueryConnectionSpec. - * @member {google.cloud.datacatalog.v1.IBigQueryConnectionSpec|null|undefined} bigqueryConnectionSpec - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @instance - */ - DataSourceConnectionSpec.prototype.bigqueryConnectionSpec = null; - - /** - * Creates a new DataSourceConnectionSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataSourceConnectionSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DataSourceConnectionSpec} DataSourceConnectionSpec instance - */ - DataSourceConnectionSpec.create = function create(properties) { - return new DataSourceConnectionSpec(properties); - }; - - /** - * Encodes the specified DataSourceConnectionSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DataSourceConnectionSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataSourceConnectionSpec} message DataSourceConnectionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceConnectionSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bigqueryConnectionSpec != null && Object.hasOwnProperty.call(message, "bigqueryConnectionSpec")) - $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec.encode(message.bigqueryConnectionSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataSourceConnectionSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataSourceConnectionSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataSourceConnectionSpec} message DataSourceConnectionSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceConnectionSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSourceConnectionSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DataSourceConnectionSpec} DataSourceConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceConnectionSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DataSourceConnectionSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bigqueryConnectionSpec = $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSourceConnectionSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DataSourceConnectionSpec} DataSourceConnectionSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceConnectionSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSourceConnectionSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSourceConnectionSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bigqueryConnectionSpec != null && message.hasOwnProperty("bigqueryConnectionSpec")) { - var error = $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec.verify(message.bigqueryConnectionSpec); - if (error) - return "bigqueryConnectionSpec." + error; - } - return null; - }; - - /** - * Creates a DataSourceConnectionSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DataSourceConnectionSpec} DataSourceConnectionSpec - */ - DataSourceConnectionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DataSourceConnectionSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.DataSourceConnectionSpec(); - if (object.bigqueryConnectionSpec != null) { - if (typeof object.bigqueryConnectionSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DataSourceConnectionSpec.bigqueryConnectionSpec: object expected"); - message.bigqueryConnectionSpec = $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec.fromObject(object.bigqueryConnectionSpec); - } - return message; - }; - - /** - * Creates a plain object from a DataSourceConnectionSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @static - * @param {google.cloud.datacatalog.v1.DataSourceConnectionSpec} message DataSourceConnectionSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSourceConnectionSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bigqueryConnectionSpec = null; - if (message.bigqueryConnectionSpec != null && message.hasOwnProperty("bigqueryConnectionSpec")) - object.bigqueryConnectionSpec = $root.google.cloud.datacatalog.v1.BigQueryConnectionSpec.toObject(message.bigqueryConnectionSpec, options); - return object; - }; - - /** - * Converts this DataSourceConnectionSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @instance - * @returns {Object.} JSON object - */ - DataSourceConnectionSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSourceConnectionSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DataSourceConnectionSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSourceConnectionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DataSourceConnectionSpec"; - }; - - return DataSourceConnectionSpec; - })(); - - v1.RoutineSpec = (function() { - - /** - * Properties of a RoutineSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IRoutineSpec - * @property {google.cloud.datacatalog.v1.RoutineSpec.RoutineType|null} [routineType] RoutineSpec routineType - * @property {string|null} [language] RoutineSpec language - * @property {Array.|null} [routineArguments] RoutineSpec routineArguments - * @property {string|null} [returnType] RoutineSpec returnType - * @property {string|null} [definitionBody] RoutineSpec definitionBody - * @property {google.cloud.datacatalog.v1.IBigQueryRoutineSpec|null} [bigqueryRoutineSpec] RoutineSpec bigqueryRoutineSpec - */ - - /** - * Constructs a new RoutineSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a RoutineSpec. - * @implements IRoutineSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IRoutineSpec=} [properties] Properties to set - */ - function RoutineSpec(properties) { - this.routineArguments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RoutineSpec routineType. - * @member {google.cloud.datacatalog.v1.RoutineSpec.RoutineType} routineType - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @instance - */ - RoutineSpec.prototype.routineType = 0; - - /** - * RoutineSpec language. - * @member {string} language - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @instance - */ - RoutineSpec.prototype.language = ""; - - /** - * RoutineSpec routineArguments. - * @member {Array.} routineArguments - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @instance - */ - RoutineSpec.prototype.routineArguments = $util.emptyArray; - - /** - * RoutineSpec returnType. - * @member {string} returnType - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @instance - */ - RoutineSpec.prototype.returnType = ""; - - /** - * RoutineSpec definitionBody. - * @member {string} definitionBody - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @instance - */ - RoutineSpec.prototype.definitionBody = ""; - - /** - * RoutineSpec bigqueryRoutineSpec. - * @member {google.cloud.datacatalog.v1.IBigQueryRoutineSpec|null|undefined} bigqueryRoutineSpec - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @instance - */ - RoutineSpec.prototype.bigqueryRoutineSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RoutineSpec systemSpec. - * @member {"bigqueryRoutineSpec"|undefined} systemSpec - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @instance - */ - Object.defineProperty(RoutineSpec.prototype, "systemSpec", { - get: $util.oneOfGetter($oneOfFields = ["bigqueryRoutineSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RoutineSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @static - * @param {google.cloud.datacatalog.v1.IRoutineSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.RoutineSpec} RoutineSpec instance - */ - RoutineSpec.create = function create(properties) { - return new RoutineSpec(properties); - }; - - /** - * Encodes the specified RoutineSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.RoutineSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @static - * @param {google.cloud.datacatalog.v1.IRoutineSpec} message RoutineSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RoutineSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.routineType != null && Object.hasOwnProperty.call(message, "routineType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.routineType); - if (message.language != null && Object.hasOwnProperty.call(message, "language")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.language); - if (message.routineArguments != null && message.routineArguments.length) - for (var i = 0; i < message.routineArguments.length; ++i) - $root.google.cloud.datacatalog.v1.RoutineSpec.Argument.encode(message.routineArguments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.returnType != null && Object.hasOwnProperty.call(message, "returnType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.returnType); - if (message.definitionBody != null && Object.hasOwnProperty.call(message, "definitionBody")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.definitionBody); - if (message.bigqueryRoutineSpec != null && Object.hasOwnProperty.call(message, "bigqueryRoutineSpec")) - $root.google.cloud.datacatalog.v1.BigQueryRoutineSpec.encode(message.bigqueryRoutineSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RoutineSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RoutineSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @static - * @param {google.cloud.datacatalog.v1.IRoutineSpec} message RoutineSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RoutineSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RoutineSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.RoutineSpec} RoutineSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RoutineSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.RoutineSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.routineType = reader.int32(); - break; - } - case 2: { - message.language = reader.string(); - break; - } - case 3: { - if (!(message.routineArguments && message.routineArguments.length)) - message.routineArguments = []; - message.routineArguments.push($root.google.cloud.datacatalog.v1.RoutineSpec.Argument.decode(reader, reader.uint32())); - break; - } - case 4: { - message.returnType = reader.string(); - break; - } - case 5: { - message.definitionBody = reader.string(); - break; - } - case 6: { - message.bigqueryRoutineSpec = $root.google.cloud.datacatalog.v1.BigQueryRoutineSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RoutineSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.RoutineSpec} RoutineSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RoutineSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RoutineSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RoutineSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.routineType != null && message.hasOwnProperty("routineType")) - switch (message.routineType) { - default: - return "routineType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.language != null && message.hasOwnProperty("language")) - if (!$util.isString(message.language)) - return "language: string expected"; - if (message.routineArguments != null && message.hasOwnProperty("routineArguments")) { - if (!Array.isArray(message.routineArguments)) - return "routineArguments: array expected"; - for (var i = 0; i < message.routineArguments.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.RoutineSpec.Argument.verify(message.routineArguments[i]); - if (error) - return "routineArguments." + error; - } - } - if (message.returnType != null && message.hasOwnProperty("returnType")) - if (!$util.isString(message.returnType)) - return "returnType: string expected"; - if (message.definitionBody != null && message.hasOwnProperty("definitionBody")) - if (!$util.isString(message.definitionBody)) - return "definitionBody: string expected"; - if (message.bigqueryRoutineSpec != null && message.hasOwnProperty("bigqueryRoutineSpec")) { - properties.systemSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.BigQueryRoutineSpec.verify(message.bigqueryRoutineSpec); - if (error) - return "bigqueryRoutineSpec." + error; - } - } - return null; - }; - - /** - * Creates a RoutineSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.RoutineSpec} RoutineSpec - */ - RoutineSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.RoutineSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.RoutineSpec(); - switch (object.routineType) { - default: - if (typeof object.routineType === "number") { - message.routineType = object.routineType; - break; - } - break; - case "ROUTINE_TYPE_UNSPECIFIED": - case 0: - message.routineType = 0; - break; - case "SCALAR_FUNCTION": - case 1: - message.routineType = 1; - break; - case "PROCEDURE": - case 2: - message.routineType = 2; - break; - } - if (object.language != null) - message.language = String(object.language); - if (object.routineArguments) { - if (!Array.isArray(object.routineArguments)) - throw TypeError(".google.cloud.datacatalog.v1.RoutineSpec.routineArguments: array expected"); - message.routineArguments = []; - for (var i = 0; i < object.routineArguments.length; ++i) { - if (typeof object.routineArguments[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.RoutineSpec.routineArguments: object expected"); - message.routineArguments[i] = $root.google.cloud.datacatalog.v1.RoutineSpec.Argument.fromObject(object.routineArguments[i]); - } - } - if (object.returnType != null) - message.returnType = String(object.returnType); - if (object.definitionBody != null) - message.definitionBody = String(object.definitionBody); - if (object.bigqueryRoutineSpec != null) { - if (typeof object.bigqueryRoutineSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.RoutineSpec.bigqueryRoutineSpec: object expected"); - message.bigqueryRoutineSpec = $root.google.cloud.datacatalog.v1.BigQueryRoutineSpec.fromObject(object.bigqueryRoutineSpec); - } - return message; - }; - - /** - * Creates a plain object from a RoutineSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @static - * @param {google.cloud.datacatalog.v1.RoutineSpec} message RoutineSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RoutineSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.routineArguments = []; - if (options.defaults) { - object.routineType = options.enums === String ? "ROUTINE_TYPE_UNSPECIFIED" : 0; - object.language = ""; - object.returnType = ""; - object.definitionBody = ""; - } - if (message.routineType != null && message.hasOwnProperty("routineType")) - object.routineType = options.enums === String ? $root.google.cloud.datacatalog.v1.RoutineSpec.RoutineType[message.routineType] === undefined ? message.routineType : $root.google.cloud.datacatalog.v1.RoutineSpec.RoutineType[message.routineType] : message.routineType; - if (message.language != null && message.hasOwnProperty("language")) - object.language = message.language; - if (message.routineArguments && message.routineArguments.length) { - object.routineArguments = []; - for (var j = 0; j < message.routineArguments.length; ++j) - object.routineArguments[j] = $root.google.cloud.datacatalog.v1.RoutineSpec.Argument.toObject(message.routineArguments[j], options); - } - if (message.returnType != null && message.hasOwnProperty("returnType")) - object.returnType = message.returnType; - if (message.definitionBody != null && message.hasOwnProperty("definitionBody")) - object.definitionBody = message.definitionBody; - if (message.bigqueryRoutineSpec != null && message.hasOwnProperty("bigqueryRoutineSpec")) { - object.bigqueryRoutineSpec = $root.google.cloud.datacatalog.v1.BigQueryRoutineSpec.toObject(message.bigqueryRoutineSpec, options); - if (options.oneofs) - object.systemSpec = "bigqueryRoutineSpec"; - } - return object; - }; - - /** - * Converts this RoutineSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @instance - * @returns {Object.} JSON object - */ - RoutineSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RoutineSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RoutineSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.RoutineSpec"; - }; - - /** - * RoutineType enum. - * @name google.cloud.datacatalog.v1.RoutineSpec.RoutineType - * @enum {number} - * @property {number} ROUTINE_TYPE_UNSPECIFIED=0 ROUTINE_TYPE_UNSPECIFIED value - * @property {number} SCALAR_FUNCTION=1 SCALAR_FUNCTION value - * @property {number} PROCEDURE=2 PROCEDURE value - */ - RoutineSpec.RoutineType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTINE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCALAR_FUNCTION"] = 1; - values[valuesById[2] = "PROCEDURE"] = 2; - return values; - })(); - - RoutineSpec.Argument = (function() { - - /** - * Properties of an Argument. - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @interface IArgument - * @property {string|null} [name] Argument name - * @property {google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode|null} [mode] Argument mode - * @property {string|null} [type] Argument type - */ - - /** - * Constructs a new Argument. - * @memberof google.cloud.datacatalog.v1.RoutineSpec - * @classdesc Represents an Argument. - * @implements IArgument - * @constructor - * @param {google.cloud.datacatalog.v1.RoutineSpec.IArgument=} [properties] Properties to set - */ - function Argument(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Argument name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @instance - */ - Argument.prototype.name = ""; - - /** - * Argument mode. - * @member {google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode} mode - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @instance - */ - Argument.prototype.mode = 0; - - /** - * Argument type. - * @member {string} type - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @instance - */ - Argument.prototype.type = ""; - - /** - * Creates a new Argument instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @static - * @param {google.cloud.datacatalog.v1.RoutineSpec.IArgument=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.RoutineSpec.Argument} Argument instance - */ - Argument.create = function create(properties) { - return new Argument(properties); - }; - - /** - * Encodes the specified Argument message. Does not implicitly {@link google.cloud.datacatalog.v1.RoutineSpec.Argument.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @static - * @param {google.cloud.datacatalog.v1.RoutineSpec.IArgument} message Argument message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Argument.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.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mode); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - return writer; - }; - - /** - * Encodes the specified Argument message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RoutineSpec.Argument.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @static - * @param {google.cloud.datacatalog.v1.RoutineSpec.IArgument} message Argument message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Argument.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Argument message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.RoutineSpec.Argument} Argument - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Argument.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.RoutineSpec.Argument(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.mode = reader.int32(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Argument message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.RoutineSpec.Argument} Argument - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Argument.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Argument message. - * @function verify - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Argument.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.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - return null; - }; - - /** - * Creates an Argument message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.RoutineSpec.Argument} Argument - */ - Argument.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.RoutineSpec.Argument) - return object; - var message = new $root.google.cloud.datacatalog.v1.RoutineSpec.Argument(); - if (object.name != null) - message.name = String(object.name); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "IN": - case 1: - message.mode = 1; - break; - case "OUT": - case 2: - message.mode = 2; - break; - case "INOUT": - case 3: - message.mode = 3; - break; - } - if (object.type != null) - message.type = String(object.type); - return message; - }; - - /** - * Creates a plain object from an Argument message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @static - * @param {google.cloud.datacatalog.v1.RoutineSpec.Argument} message Argument - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Argument.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - object.type = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode[message.mode] : message.mode; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; - - /** - * Converts this Argument to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @instance - * @returns {Object.} JSON object - */ - Argument.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Argument - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.RoutineSpec.Argument - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Argument.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.RoutineSpec.Argument"; - }; - - /** - * Mode enum. - * @name google.cloud.datacatalog.v1.RoutineSpec.Argument.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} IN=1 IN value - * @property {number} OUT=2 OUT value - * @property {number} INOUT=3 INOUT value - */ - Argument.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN"] = 1; - values[valuesById[2] = "OUT"] = 2; - values[valuesById[3] = "INOUT"] = 3; - return values; - })(); - - return Argument; - })(); - - return RoutineSpec; - })(); - - v1.BusinessContext = (function() { - - /** - * Properties of a BusinessContext. - * @memberof google.cloud.datacatalog.v1 - * @interface IBusinessContext - * @property {google.cloud.datacatalog.v1.IEntryOverview|null} [entryOverview] BusinessContext entryOverview - * @property {google.cloud.datacatalog.v1.IContacts|null} [contacts] BusinessContext contacts - */ - - /** - * Constructs a new BusinessContext. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a BusinessContext. - * @implements IBusinessContext - * @constructor - * @param {google.cloud.datacatalog.v1.IBusinessContext=} [properties] Properties to set - */ - function BusinessContext(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BusinessContext entryOverview. - * @member {google.cloud.datacatalog.v1.IEntryOverview|null|undefined} entryOverview - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @instance - */ - BusinessContext.prototype.entryOverview = null; - - /** - * BusinessContext contacts. - * @member {google.cloud.datacatalog.v1.IContacts|null|undefined} contacts - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @instance - */ - BusinessContext.prototype.contacts = null; - - /** - * Creates a new BusinessContext instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @static - * @param {google.cloud.datacatalog.v1.IBusinessContext=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.BusinessContext} BusinessContext instance - */ - BusinessContext.create = function create(properties) { - return new BusinessContext(properties); - }; - - /** - * Encodes the specified BusinessContext message. Does not implicitly {@link google.cloud.datacatalog.v1.BusinessContext.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @static - * @param {google.cloud.datacatalog.v1.IBusinessContext} message BusinessContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BusinessContext.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entryOverview != null && Object.hasOwnProperty.call(message, "entryOverview")) - $root.google.cloud.datacatalog.v1.EntryOverview.encode(message.entryOverview, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.contacts != null && Object.hasOwnProperty.call(message, "contacts")) - $root.google.cloud.datacatalog.v1.Contacts.encode(message.contacts, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BusinessContext message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BusinessContext.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @static - * @param {google.cloud.datacatalog.v1.IBusinessContext} message BusinessContext message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BusinessContext.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BusinessContext message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.BusinessContext} BusinessContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BusinessContext.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.BusinessContext(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entryOverview = $root.google.cloud.datacatalog.v1.EntryOverview.decode(reader, reader.uint32()); - break; - } - case 2: { - message.contacts = $root.google.cloud.datacatalog.v1.Contacts.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BusinessContext message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.BusinessContext} BusinessContext - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BusinessContext.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BusinessContext message. - * @function verify - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BusinessContext.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entryOverview != null && message.hasOwnProperty("entryOverview")) { - var error = $root.google.cloud.datacatalog.v1.EntryOverview.verify(message.entryOverview); - if (error) - return "entryOverview." + error; - } - if (message.contacts != null && message.hasOwnProperty("contacts")) { - var error = $root.google.cloud.datacatalog.v1.Contacts.verify(message.contacts); - if (error) - return "contacts." + error; - } - return null; - }; - - /** - * Creates a BusinessContext message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.BusinessContext} BusinessContext - */ - BusinessContext.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.BusinessContext) - return object; - var message = new $root.google.cloud.datacatalog.v1.BusinessContext(); - if (object.entryOverview != null) { - if (typeof object.entryOverview !== "object") - throw TypeError(".google.cloud.datacatalog.v1.BusinessContext.entryOverview: object expected"); - message.entryOverview = $root.google.cloud.datacatalog.v1.EntryOverview.fromObject(object.entryOverview); - } - if (object.contacts != null) { - if (typeof object.contacts !== "object") - throw TypeError(".google.cloud.datacatalog.v1.BusinessContext.contacts: object expected"); - message.contacts = $root.google.cloud.datacatalog.v1.Contacts.fromObject(object.contacts); - } - return message; - }; - - /** - * Creates a plain object from a BusinessContext message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @static - * @param {google.cloud.datacatalog.v1.BusinessContext} message BusinessContext - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BusinessContext.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entryOverview = null; - object.contacts = null; - } - if (message.entryOverview != null && message.hasOwnProperty("entryOverview")) - object.entryOverview = $root.google.cloud.datacatalog.v1.EntryOverview.toObject(message.entryOverview, options); - if (message.contacts != null && message.hasOwnProperty("contacts")) - object.contacts = $root.google.cloud.datacatalog.v1.Contacts.toObject(message.contacts, options); - return object; - }; - - /** - * Converts this BusinessContext to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @instance - * @returns {Object.} JSON object - */ - BusinessContext.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BusinessContext - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.BusinessContext - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BusinessContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.BusinessContext"; - }; - - return BusinessContext; - })(); - - v1.EntryOverview = (function() { - - /** - * Properties of an EntryOverview. - * @memberof google.cloud.datacatalog.v1 - * @interface IEntryOverview - * @property {string|null} [overview] EntryOverview overview - */ - - /** - * Constructs a new EntryOverview. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an EntryOverview. - * @implements IEntryOverview - * @constructor - * @param {google.cloud.datacatalog.v1.IEntryOverview=} [properties] Properties to set - */ - function EntryOverview(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EntryOverview overview. - * @member {string} overview - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @instance - */ - EntryOverview.prototype.overview = ""; - - /** - * Creates a new EntryOverview instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @static - * @param {google.cloud.datacatalog.v1.IEntryOverview=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.EntryOverview} EntryOverview instance - */ - EntryOverview.create = function create(properties) { - return new EntryOverview(properties); - }; - - /** - * Encodes the specified EntryOverview message. Does not implicitly {@link google.cloud.datacatalog.v1.EntryOverview.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @static - * @param {google.cloud.datacatalog.v1.IEntryOverview} message EntryOverview message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntryOverview.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.overview); - return writer; - }; - - /** - * Encodes the specified EntryOverview message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.EntryOverview.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @static - * @param {google.cloud.datacatalog.v1.IEntryOverview} message EntryOverview message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntryOverview.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EntryOverview message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.EntryOverview} EntryOverview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntryOverview.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.EntryOverview(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.overview = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EntryOverview message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.EntryOverview} EntryOverview - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntryOverview.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EntryOverview message. - * @function verify - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntryOverview.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.overview != null && message.hasOwnProperty("overview")) - if (!$util.isString(message.overview)) - return "overview: string expected"; - return null; - }; - - /** - * Creates an EntryOverview message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.EntryOverview} EntryOverview - */ - EntryOverview.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.EntryOverview) - return object; - var message = new $root.google.cloud.datacatalog.v1.EntryOverview(); - if (object.overview != null) - message.overview = String(object.overview); - return message; - }; - - /** - * Creates a plain object from an EntryOverview message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @static - * @param {google.cloud.datacatalog.v1.EntryOverview} message EntryOverview - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntryOverview.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.overview = ""; - if (message.overview != null && message.hasOwnProperty("overview")) - object.overview = message.overview; - return object; - }; - - /** - * Converts this EntryOverview to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @instance - * @returns {Object.} JSON object - */ - EntryOverview.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EntryOverview - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.EntryOverview - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EntryOverview.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.EntryOverview"; - }; - - return EntryOverview; - })(); - - v1.Contacts = (function() { - - /** - * Properties of a Contacts. - * @memberof google.cloud.datacatalog.v1 - * @interface IContacts - * @property {Array.|null} [people] Contacts people - */ - - /** - * Constructs a new Contacts. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a Contacts. - * @implements IContacts - * @constructor - * @param {google.cloud.datacatalog.v1.IContacts=} [properties] Properties to set - */ - function Contacts(properties) { - this.people = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Contacts people. - * @member {Array.} people - * @memberof google.cloud.datacatalog.v1.Contacts - * @instance - */ - Contacts.prototype.people = $util.emptyArray; - - /** - * Creates a new Contacts instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.Contacts - * @static - * @param {google.cloud.datacatalog.v1.IContacts=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.Contacts} Contacts instance - */ - Contacts.create = function create(properties) { - return new Contacts(properties); - }; - - /** - * Encodes the specified Contacts message. Does not implicitly {@link google.cloud.datacatalog.v1.Contacts.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.Contacts - * @static - * @param {google.cloud.datacatalog.v1.IContacts} message Contacts message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Contacts.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.people != null && message.people.length) - for (var i = 0; i < message.people.length; ++i) - $root.google.cloud.datacatalog.v1.Contacts.Person.encode(message.people[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Contacts message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Contacts.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.Contacts - * @static - * @param {google.cloud.datacatalog.v1.IContacts} message Contacts message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Contacts.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Contacts message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.Contacts - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.Contacts} Contacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Contacts.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.Contacts(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.people && message.people.length)) - message.people = []; - message.people.push($root.google.cloud.datacatalog.v1.Contacts.Person.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Contacts message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.Contacts - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.Contacts} Contacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Contacts.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Contacts message. - * @function verify - * @memberof google.cloud.datacatalog.v1.Contacts - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Contacts.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.people != null && message.hasOwnProperty("people")) { - if (!Array.isArray(message.people)) - return "people: array expected"; - for (var i = 0; i < message.people.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.Contacts.Person.verify(message.people[i]); - if (error) - return "people." + error; - } - } - return null; - }; - - /** - * Creates a Contacts message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.Contacts - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.Contacts} Contacts - */ - Contacts.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.Contacts) - return object; - var message = new $root.google.cloud.datacatalog.v1.Contacts(); - if (object.people) { - if (!Array.isArray(object.people)) - throw TypeError(".google.cloud.datacatalog.v1.Contacts.people: array expected"); - message.people = []; - for (var i = 0; i < object.people.length; ++i) { - if (typeof object.people[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Contacts.people: object expected"); - message.people[i] = $root.google.cloud.datacatalog.v1.Contacts.Person.fromObject(object.people[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Contacts message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.Contacts - * @static - * @param {google.cloud.datacatalog.v1.Contacts} message Contacts - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Contacts.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.people = []; - if (message.people && message.people.length) { - object.people = []; - for (var j = 0; j < message.people.length; ++j) - object.people[j] = $root.google.cloud.datacatalog.v1.Contacts.Person.toObject(message.people[j], options); - } - return object; - }; - - /** - * Converts this Contacts to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.Contacts - * @instance - * @returns {Object.} JSON object - */ - Contacts.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Contacts - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.Contacts - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Contacts.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.Contacts"; - }; - - Contacts.Person = (function() { - - /** - * Properties of a Person. - * @memberof google.cloud.datacatalog.v1.Contacts - * @interface IPerson - * @property {string|null} [designation] Person designation - * @property {string|null} [email] Person email - */ - - /** - * Constructs a new Person. - * @memberof google.cloud.datacatalog.v1.Contacts - * @classdesc Represents a Person. - * @implements IPerson - * @constructor - * @param {google.cloud.datacatalog.v1.Contacts.IPerson=} [properties] Properties to set - */ - function Person(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Person designation. - * @member {string} designation - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @instance - */ - Person.prototype.designation = ""; - - /** - * Person email. - * @member {string} email - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @instance - */ - Person.prototype.email = ""; - - /** - * Creates a new Person instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @static - * @param {google.cloud.datacatalog.v1.Contacts.IPerson=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.Contacts.Person} Person instance - */ - Person.create = function create(properties) { - return new Person(properties); - }; - - /** - * Encodes the specified Person message. Does not implicitly {@link google.cloud.datacatalog.v1.Contacts.Person.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @static - * @param {google.cloud.datacatalog.v1.Contacts.IPerson} message Person message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Person.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.designation != null && Object.hasOwnProperty.call(message, "designation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.designation); - if (message.email != null && Object.hasOwnProperty.call(message, "email")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.email); - return writer; - }; - - /** - * Encodes the specified Person message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Contacts.Person.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @static - * @param {google.cloud.datacatalog.v1.Contacts.IPerson} message Person message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Person.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Person message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.Contacts.Person} Person - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Person.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.Contacts.Person(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.designation = reader.string(); - break; - } - case 2: { - message.email = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Person message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.Contacts.Person} Person - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Person.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Person message. - * @function verify - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Person.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.designation != null && message.hasOwnProperty("designation")) - if (!$util.isString(message.designation)) - return "designation: string expected"; - if (message.email != null && message.hasOwnProperty("email")) - if (!$util.isString(message.email)) - return "email: string expected"; - return null; - }; - - /** - * Creates a Person message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.Contacts.Person} Person - */ - Person.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.Contacts.Person) - return object; - var message = new $root.google.cloud.datacatalog.v1.Contacts.Person(); - if (object.designation != null) - message.designation = String(object.designation); - if (object.email != null) - message.email = String(object.email); - return message; - }; - - /** - * Creates a plain object from a Person message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @static - * @param {google.cloud.datacatalog.v1.Contacts.Person} message Person - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Person.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.designation = ""; - object.email = ""; - } - if (message.designation != null && message.hasOwnProperty("designation")) - object.designation = message.designation; - if (message.email != null && message.hasOwnProperty("email")) - object.email = message.email; - return object; - }; - - /** - * Converts this Person to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @instance - * @returns {Object.} JSON object - */ - Person.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Person - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.Contacts.Person - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Person.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.Contacts.Person"; - }; - - return Person; - })(); - - return Contacts; - })(); - - v1.EntryGroup = (function() { - - /** - * Properties of an EntryGroup. - * @memberof google.cloud.datacatalog.v1 - * @interface IEntryGroup - * @property {string|null} [name] EntryGroup name - * @property {string|null} [displayName] EntryGroup displayName - * @property {string|null} [description] EntryGroup description - * @property {google.cloud.datacatalog.v1.ISystemTimestamps|null} [dataCatalogTimestamps] EntryGroup dataCatalogTimestamps - */ - - /** - * Constructs a new EntryGroup. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an EntryGroup. - * @implements IEntryGroup - * @constructor - * @param {google.cloud.datacatalog.v1.IEntryGroup=} [properties] Properties to set - */ - function EntryGroup(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EntryGroup name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.name = ""; - - /** - * EntryGroup displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.displayName = ""; - - /** - * EntryGroup description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.description = ""; - - /** - * EntryGroup dataCatalogTimestamps. - * @member {google.cloud.datacatalog.v1.ISystemTimestamps|null|undefined} dataCatalogTimestamps - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @instance - */ - EntryGroup.prototype.dataCatalogTimestamps = null; - - /** - * Creates a new EntryGroup instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @static - * @param {google.cloud.datacatalog.v1.IEntryGroup=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.EntryGroup} EntryGroup instance - */ - EntryGroup.create = function create(properties) { - return new EntryGroup(properties); - }; - - /** - * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.datacatalog.v1.EntryGroup.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @static - * @param {google.cloud.datacatalog.v1.IEntryGroup} message EntryGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntryGroup.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.dataCatalogTimestamps != null && Object.hasOwnProperty.call(message, "dataCatalogTimestamps")) - $root.google.cloud.datacatalog.v1.SystemTimestamps.encode(message.dataCatalogTimestamps, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.EntryGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @static - * @param {google.cloud.datacatalog.v1.IEntryGroup} message EntryGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntryGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EntryGroup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.EntryGroup} EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntryGroup.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.EntryGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EntryGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.EntryGroup} EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntryGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EntryGroup message. - * @function verify - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntryGroup.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) { - var error = $root.google.cloud.datacatalog.v1.SystemTimestamps.verify(message.dataCatalogTimestamps); - if (error) - return "dataCatalogTimestamps." + error; - } - return null; - }; - - /** - * Creates an EntryGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.EntryGroup} EntryGroup - */ - EntryGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.EntryGroup) - return object; - var message = new $root.google.cloud.datacatalog.v1.EntryGroup(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.dataCatalogTimestamps != null) { - if (typeof object.dataCatalogTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1.EntryGroup.dataCatalogTimestamps: object expected"); - message.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.fromObject(object.dataCatalogTimestamps); - } - return message; - }; - - /** - * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @static - * @param {google.cloud.datacatalog.v1.EntryGroup} message EntryGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntryGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.dataCatalogTimestamps = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) - object.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.toObject(message.dataCatalogTimestamps, options); - return object; - }; - - /** - * Converts this EntryGroup to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @instance - * @returns {Object.} JSON object - */ - EntryGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EntryGroup - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.EntryGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EntryGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.EntryGroup"; - }; - - return EntryGroup; - })(); - - v1.CreateTagTemplateRequest = (function() { - - /** - * Properties of a CreateTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ICreateTagTemplateRequest - * @property {string|null} [parent] CreateTagTemplateRequest parent - * @property {string|null} [tagTemplateId] CreateTagTemplateRequest tagTemplateId - * @property {google.cloud.datacatalog.v1.ITagTemplate|null} [tagTemplate] CreateTagTemplateRequest tagTemplate - */ - - /** - * Constructs a new CreateTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CreateTagTemplateRequest. - * @implements ICreateTagTemplateRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateRequest=} [properties] Properties to set - */ - function CreateTagTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTagTemplateRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @instance - */ - CreateTagTemplateRequest.prototype.parent = ""; - - /** - * CreateTagTemplateRequest tagTemplateId. - * @member {string} tagTemplateId - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @instance - */ - CreateTagTemplateRequest.prototype.tagTemplateId = ""; - - /** - * CreateTagTemplateRequest tagTemplate. - * @member {google.cloud.datacatalog.v1.ITagTemplate|null|undefined} tagTemplate - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @instance - */ - CreateTagTemplateRequest.prototype.tagTemplate = null; - - /** - * Creates a new CreateTagTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CreateTagTemplateRequest} CreateTagTemplateRequest instance - */ - CreateTagTemplateRequest.create = function create(properties) { - return new CreateTagTemplateRequest(properties); - }; - - /** - * Encodes the specified CreateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateRequest} message CreateTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagTemplateRequest.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.tagTemplate != null && Object.hasOwnProperty.call(message, "tagTemplate")) - $root.google.cloud.datacatalog.v1.TagTemplate.encode(message.tagTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tagTemplateId != null && Object.hasOwnProperty.call(message, "tagTemplateId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tagTemplateId); - return writer; - }; - - /** - * Encodes the specified CreateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateRequest} message CreateTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.CreateTagTemplateRequest} CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagTemplateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.CreateTagTemplateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.tagTemplateId = reader.string(); - break; - } - case 2: { - message.tagTemplate = $root.google.cloud.datacatalog.v1.TagTemplate.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CreateTagTemplateRequest} CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTagTemplateRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTagTemplateRequest.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.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) - if (!$util.isString(message.tagTemplateId)) - return "tagTemplateId: string expected"; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) { - var error = $root.google.cloud.datacatalog.v1.TagTemplate.verify(message.tagTemplate); - if (error) - return "tagTemplate." + error; - } - return null; - }; - - /** - * Creates a CreateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CreateTagTemplateRequest} CreateTagTemplateRequest - */ - CreateTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CreateTagTemplateRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.CreateTagTemplateRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tagTemplateId != null) - message.tagTemplateId = String(object.tagTemplateId); - if (object.tagTemplate != null) { - if (typeof object.tagTemplate !== "object") - throw TypeError(".google.cloud.datacatalog.v1.CreateTagTemplateRequest.tagTemplate: object expected"); - message.tagTemplate = $root.google.cloud.datacatalog.v1.TagTemplate.fromObject(object.tagTemplate); - } - return message; - }; - - /** - * Creates a plain object from a CreateTagTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.CreateTagTemplateRequest} message CreateTagTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTagTemplateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.tagTemplate = null; - object.tagTemplateId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - object.tagTemplate = $root.google.cloud.datacatalog.v1.TagTemplate.toObject(message.tagTemplate, options); - if (message.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) - object.tagTemplateId = message.tagTemplateId; - return object; - }; - - /** - * Converts this CreateTagTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTagTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTagTemplateRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTagTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CreateTagTemplateRequest"; - }; - - return CreateTagTemplateRequest; - })(); - - v1.GetTagTemplateRequest = (function() { - - /** - * Properties of a GetTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IGetTagTemplateRequest - * @property {string|null} [name] GetTagTemplateRequest name - */ - - /** - * Constructs a new GetTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a GetTagTemplateRequest. - * @implements IGetTagTemplateRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IGetTagTemplateRequest=} [properties] Properties to set - */ - function GetTagTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTagTemplateRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @instance - */ - GetTagTemplateRequest.prototype.name = ""; - - /** - * Creates a new GetTagTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.GetTagTemplateRequest} GetTagTemplateRequest instance - */ - GetTagTemplateRequest.create = function create(properties) { - return new GetTagTemplateRequest(properties); - }; - - /** - * Encodes the specified GetTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetTagTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetTagTemplateRequest} message GetTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTagTemplateRequest.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 GetTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetTagTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetTagTemplateRequest} message GetTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.GetTagTemplateRequest} GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTagTemplateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.GetTagTemplateRequest(); - 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 GetTagTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.GetTagTemplateRequest} GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTagTemplateRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTagTemplateRequest.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 GetTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.GetTagTemplateRequest} GetTagTemplateRequest - */ - GetTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.GetTagTemplateRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.GetTagTemplateRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetTagTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.GetTagTemplateRequest} message GetTagTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTagTemplateRequest.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 GetTagTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - GetTagTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetTagTemplateRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.GetTagTemplateRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTagTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.GetTagTemplateRequest"; - }; - - return GetTagTemplateRequest; - })(); - - v1.UpdateTagTemplateRequest = (function() { - - /** - * Properties of an UpdateTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IUpdateTagTemplateRequest - * @property {google.cloud.datacatalog.v1.ITagTemplate|null} [tagTemplate] UpdateTagTemplateRequest tagTemplate - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagTemplateRequest updateMask - */ - - /** - * Constructs a new UpdateTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an UpdateTagTemplateRequest. - * @implements IUpdateTagTemplateRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateRequest=} [properties] Properties to set - */ - function UpdateTagTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTagTemplateRequest tagTemplate. - * @member {google.cloud.datacatalog.v1.ITagTemplate|null|undefined} tagTemplate - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @instance - */ - UpdateTagTemplateRequest.prototype.tagTemplate = null; - - /** - * UpdateTagTemplateRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @instance - */ - UpdateTagTemplateRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTagTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UpdateTagTemplateRequest} UpdateTagTemplateRequest instance - */ - UpdateTagTemplateRequest.create = function create(properties) { - return new UpdateTagTemplateRequest(properties); - }; - - /** - * Encodes the specified UpdateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateRequest} message UpdateTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagTemplateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tagTemplate != null && Object.hasOwnProperty.call(message, "tagTemplate")) - $root.google.cloud.datacatalog.v1.TagTemplate.encode(message.tagTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateRequest} message UpdateTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UpdateTagTemplateRequest} UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagTemplateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UpdateTagTemplateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tagTemplate = $root.google.cloud.datacatalog.v1.TagTemplate.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UpdateTagTemplateRequest} UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTagTemplateRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTagTemplateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) { - var error = $root.google.cloud.datacatalog.v1.TagTemplate.verify(message.tagTemplate); - if (error) - return "tagTemplate." + 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 UpdateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UpdateTagTemplateRequest} UpdateTagTemplateRequest - */ - UpdateTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UpdateTagTemplateRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.UpdateTagTemplateRequest(); - if (object.tagTemplate != null) { - if (typeof object.tagTemplate !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateTagTemplateRequest.tagTemplate: object expected"); - message.tagTemplate = $root.google.cloud.datacatalog.v1.TagTemplate.fromObject(object.tagTemplate); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateTagTemplateRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTagTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.UpdateTagTemplateRequest} message UpdateTagTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTagTemplateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tagTemplate = null; - object.updateMask = null; - } - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - object.tagTemplate = $root.google.cloud.datacatalog.v1.TagTemplate.toObject(message.tagTemplate, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateTagTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTagTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTagTemplateRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTagTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UpdateTagTemplateRequest"; - }; - - return UpdateTagTemplateRequest; - })(); - - v1.DeleteTagTemplateRequest = (function() { - - /** - * Properties of a DeleteTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IDeleteTagTemplateRequest - * @property {string|null} [name] DeleteTagTemplateRequest name - * @property {boolean|null} [force] DeleteTagTemplateRequest force - */ - - /** - * Constructs a new DeleteTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DeleteTagTemplateRequest. - * @implements IDeleteTagTemplateRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateRequest=} [properties] Properties to set - */ - function DeleteTagTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTagTemplateRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @instance - */ - DeleteTagTemplateRequest.prototype.name = ""; - - /** - * DeleteTagTemplateRequest force. - * @member {boolean} force - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @instance - */ - DeleteTagTemplateRequest.prototype.force = false; - - /** - * Creates a new DeleteTagTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DeleteTagTemplateRequest} DeleteTagTemplateRequest instance - */ - DeleteTagTemplateRequest.create = function create(properties) { - return new DeleteTagTemplateRequest(properties); - }; - - /** - * Encodes the specified DeleteTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateRequest} message DeleteTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagTemplateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateRequest} message DeleteTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DeleteTagTemplateRequest} DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagTemplateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DeleteTagTemplateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DeleteTagTemplateRequest} DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTagTemplateRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTagTemplateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DeleteTagTemplateRequest} DeleteTagTemplateRequest - */ - DeleteTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DeleteTagTemplateRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.DeleteTagTemplateRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteTagTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1.DeleteTagTemplateRequest} message DeleteTagTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTagTemplateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteTagTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTagTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTagTemplateRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTagTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DeleteTagTemplateRequest"; - }; - - return DeleteTagTemplateRequest; - })(); - - v1.CreateTagRequest = (function() { - - /** - * Properties of a CreateTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ICreateTagRequest - * @property {string|null} [parent] CreateTagRequest parent - * @property {google.cloud.datacatalog.v1.ITag|null} [tag] CreateTagRequest tag - */ - - /** - * Constructs a new CreateTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CreateTagRequest. - * @implements ICreateTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ICreateTagRequest=} [properties] Properties to set - */ - function CreateTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTagRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @instance - */ - CreateTagRequest.prototype.parent = ""; - - /** - * CreateTagRequest tag. - * @member {google.cloud.datacatalog.v1.ITag|null|undefined} tag - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @instance - */ - CreateTagRequest.prototype.tag = null; - - /** - * Creates a new CreateTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CreateTagRequest} CreateTagRequest instance - */ - CreateTagRequest.create = function create(properties) { - return new CreateTagRequest(properties); - }; - - /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTagRequest} message CreateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagRequest.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.tag != null && Object.hasOwnProperty.call(message, "tag")) - $root.google.cloud.datacatalog.v1.Tag.encode(message.tag, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTagRequest} message CreateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.CreateTagRequest} CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.CreateTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.tag = $root.google.cloud.datacatalog.v1.Tag.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CreateTagRequest} CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTagRequest.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.tag != null && message.hasOwnProperty("tag")) { - var error = $root.google.cloud.datacatalog.v1.Tag.verify(message.tag); - if (error) - return "tag." + error; - } - return null; - }; - - /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CreateTagRequest} CreateTagRequest - */ - CreateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CreateTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.CreateTagRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.cloud.datacatalog.v1.CreateTagRequest.tag: object expected"); - message.tag = $root.google.cloud.datacatalog.v1.Tag.fromObject(object.tag); - } - return message; - }; - - /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @static - * @param {google.cloud.datacatalog.v1.CreateTagRequest} message CreateTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.tag = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = $root.google.cloud.datacatalog.v1.Tag.toObject(message.tag, options); - return object; - }; - - /** - * Converts this CreateTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CreateTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CreateTagRequest"; - }; - - return CreateTagRequest; - })(); - - v1.UpdateTagRequest = (function() { - - /** - * Properties of an UpdateTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IUpdateTagRequest - * @property {google.cloud.datacatalog.v1.ITag|null} [tag] UpdateTagRequest tag - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagRequest updateMask - */ - - /** - * Constructs a new UpdateTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an UpdateTagRequest. - * @implements IUpdateTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IUpdateTagRequest=} [properties] Properties to set - */ - function UpdateTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTagRequest tag. - * @member {google.cloud.datacatalog.v1.ITag|null|undefined} tag - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @instance - */ - UpdateTagRequest.prototype.tag = null; - - /** - * UpdateTagRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @instance - */ - UpdateTagRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UpdateTagRequest} UpdateTagRequest instance - */ - UpdateTagRequest.create = function create(properties) { - return new UpdateTagRequest(properties); - }; - - /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - $root.google.cloud.datacatalog.v1.Tag.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UpdateTagRequest} UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UpdateTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tag = $root.google.cloud.datacatalog.v1.Tag.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UpdateTagRequest} UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTagRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tag != null && message.hasOwnProperty("tag")) { - var error = $root.google.cloud.datacatalog.v1.Tag.verify(message.tag); - if (error) - return "tag." + 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 UpdateTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UpdateTagRequest} UpdateTagRequest - */ - UpdateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UpdateTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.UpdateTagRequest(); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateTagRequest.tag: object expected"); - message.tag = $root.google.cloud.datacatalog.v1.Tag.fromObject(object.tag); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateTagRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @static - * @param {google.cloud.datacatalog.v1.UpdateTagRequest} message UpdateTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tag = null; - object.updateMask = null; - } - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = $root.google.cloud.datacatalog.v1.Tag.toObject(message.tag, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UpdateTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UpdateTagRequest"; - }; - - return UpdateTagRequest; - })(); - - v1.DeleteTagRequest = (function() { - - /** - * Properties of a DeleteTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IDeleteTagRequest - * @property {string|null} [name] DeleteTagRequest name - */ - - /** - * Constructs a new DeleteTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DeleteTagRequest. - * @implements IDeleteTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IDeleteTagRequest=} [properties] Properties to set - */ - function DeleteTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTagRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @instance - */ - DeleteTagRequest.prototype.name = ""; - - /** - * Creates a new DeleteTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DeleteTagRequest} DeleteTagRequest instance - */ - DeleteTagRequest.create = function create(properties) { - return new DeleteTagRequest(properties); - }; - - /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagRequest.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 DeleteTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DeleteTagRequest} DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DeleteTagRequest(); - 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 DeleteTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DeleteTagRequest} DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTagRequest.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 DeleteTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DeleteTagRequest} DeleteTagRequest - */ - DeleteTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DeleteTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.DeleteTagRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @static - * @param {google.cloud.datacatalog.v1.DeleteTagRequest} message DeleteTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTagRequest.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 DeleteTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DeleteTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DeleteTagRequest"; - }; - - return DeleteTagRequest; - })(); - - v1.CreateTagTemplateFieldRequest = (function() { - - /** - * Properties of a CreateTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ICreateTagTemplateFieldRequest - * @property {string|null} [parent] CreateTagTemplateFieldRequest parent - * @property {string|null} [tagTemplateFieldId] CreateTagTemplateFieldRequest tagTemplateFieldId - * @property {google.cloud.datacatalog.v1.ITagTemplateField|null} [tagTemplateField] CreateTagTemplateFieldRequest tagTemplateField - */ - - /** - * Constructs a new CreateTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CreateTagTemplateFieldRequest. - * @implements ICreateTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest=} [properties] Properties to set - */ - function CreateTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTagTemplateFieldRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @instance - */ - CreateTagTemplateFieldRequest.prototype.parent = ""; - - /** - * CreateTagTemplateFieldRequest tagTemplateFieldId. - * @member {string} tagTemplateFieldId - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @instance - */ - CreateTagTemplateFieldRequest.prototype.tagTemplateFieldId = ""; - - /** - * CreateTagTemplateFieldRequest tagTemplateField. - * @member {google.cloud.datacatalog.v1.ITagTemplateField|null|undefined} tagTemplateField - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @instance - */ - CreateTagTemplateFieldRequest.prototype.tagTemplateField = null; - - /** - * Creates a new CreateTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest instance - */ - CreateTagTemplateFieldRequest.create = function create(properties) { - return new CreateTagTemplateFieldRequest(properties); - }; - - /** - * Encodes the specified CreateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagTemplateFieldRequest.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.tagTemplateFieldId != null && Object.hasOwnProperty.call(message, "tagTemplateFieldId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagTemplateFieldId); - if (message.tagTemplateField != null && Object.hasOwnProperty.call(message, "tagTemplateField")) - $root.google.cloud.datacatalog.v1.TagTemplateField.encode(message.tagTemplateField, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.tagTemplateFieldId = reader.string(); - break; - } - case 3: { - message.tagTemplateField = $root.google.cloud.datacatalog.v1.TagTemplateField.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTagTemplateFieldRequest.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.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) - if (!$util.isString(message.tagTemplateFieldId)) - return "tagTemplateFieldId: string expected"; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) { - var error = $root.google.cloud.datacatalog.v1.TagTemplateField.verify(message.tagTemplateField); - if (error) - return "tagTemplateField." + error; - } - return null; - }; - - /** - * Creates a CreateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest - */ - CreateTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tagTemplateFieldId != null) - message.tagTemplateFieldId = String(object.tagTemplateFieldId); - if (object.tagTemplateField != null) { - if (typeof object.tagTemplateField !== "object") - throw TypeError(".google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest.tagTemplateField: object expected"); - message.tagTemplateField = $root.google.cloud.datacatalog.v1.TagTemplateField.fromObject(object.tagTemplateField); - } - return message; - }; - - /** - * Creates a plain object from a CreateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.tagTemplateFieldId = ""; - object.tagTemplateField = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) - object.tagTemplateFieldId = message.tagTemplateFieldId; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) - object.tagTemplateField = $root.google.cloud.datacatalog.v1.TagTemplateField.toObject(message.tagTemplateField, options); - return object; - }; - - /** - * Converts this CreateTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTagTemplateFieldRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTagTemplateFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest"; - }; - - return CreateTagTemplateFieldRequest; - })(); - - v1.UpdateTagTemplateFieldRequest = (function() { - - /** - * Properties of an UpdateTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IUpdateTagTemplateFieldRequest - * @property {string|null} [name] UpdateTagTemplateFieldRequest name - * @property {google.cloud.datacatalog.v1.ITagTemplateField|null} [tagTemplateField] UpdateTagTemplateFieldRequest tagTemplateField - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagTemplateFieldRequest updateMask - */ - - /** - * Constructs a new UpdateTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an UpdateTagTemplateFieldRequest. - * @implements IUpdateTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest=} [properties] Properties to set - */ - function UpdateTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTagTemplateFieldRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @instance - */ - UpdateTagTemplateFieldRequest.prototype.name = ""; - - /** - * UpdateTagTemplateFieldRequest tagTemplateField. - * @member {google.cloud.datacatalog.v1.ITagTemplateField|null|undefined} tagTemplateField - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @instance - */ - UpdateTagTemplateFieldRequest.prototype.tagTemplateField = null; - - /** - * UpdateTagTemplateFieldRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @instance - */ - UpdateTagTemplateFieldRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest instance - */ - UpdateTagTemplateFieldRequest.create = function create(properties) { - return new UpdateTagTemplateFieldRequest(properties); - }; - - /** - * Encodes the specified UpdateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagTemplateFieldRequest.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.tagTemplateField != null && Object.hasOwnProperty.call(message, "tagTemplateField")) - $root.google.cloud.datacatalog.v1.TagTemplateField.encode(message.tagTemplateField, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.tagTemplateField = $root.google.cloud.datacatalog.v1.TagTemplateField.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 UpdateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTagTemplateFieldRequest.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.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) { - var error = $root.google.cloud.datacatalog.v1.TagTemplateField.verify(message.tagTemplateField); - if (error) - return "tagTemplateField." + 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 UpdateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest - */ - UpdateTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.tagTemplateField != null) { - if (typeof object.tagTemplateField !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.tagTemplateField: object expected"); - message.tagTemplateField = $root.google.cloud.datacatalog.v1.TagTemplateField.fromObject(object.tagTemplateField); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.tagTemplateField = null; - object.updateMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) - object.tagTemplateField = $root.google.cloud.datacatalog.v1.TagTemplateField.toObject(message.tagTemplateField, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTagTemplateFieldRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTagTemplateFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest"; - }; - - return UpdateTagTemplateFieldRequest; - })(); - - v1.RenameTagTemplateFieldRequest = (function() { - - /** - * Properties of a RenameTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IRenameTagTemplateFieldRequest - * @property {string|null} [name] RenameTagTemplateFieldRequest name - * @property {string|null} [newTagTemplateFieldId] RenameTagTemplateFieldRequest newTagTemplateFieldId - */ - - /** - * Constructs a new RenameTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a RenameTagTemplateFieldRequest. - * @implements IRenameTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest=} [properties] Properties to set - */ - function RenameTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RenameTagTemplateFieldRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @instance - */ - RenameTagTemplateFieldRequest.prototype.name = ""; - - /** - * RenameTagTemplateFieldRequest newTagTemplateFieldId. - * @member {string} newTagTemplateFieldId - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @instance - */ - RenameTagTemplateFieldRequest.prototype.newTagTemplateFieldId = ""; - - /** - * Creates a new RenameTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest instance - */ - RenameTagTemplateFieldRequest.create = function create(properties) { - return new RenameTagTemplateFieldRequest(properties); - }; - - /** - * Encodes the specified RenameTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RenameTagTemplateFieldRequest.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.newTagTemplateFieldId != null && Object.hasOwnProperty.call(message, "newTagTemplateFieldId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.newTagTemplateFieldId); - return writer; - }; - - /** - * Encodes the specified RenameTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RenameTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RenameTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.newTagTemplateFieldId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RenameTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RenameTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RenameTagTemplateFieldRequest.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.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) - if (!$util.isString(message.newTagTemplateFieldId)) - return "newTagTemplateFieldId: string expected"; - return null; - }; - - /** - * Creates a RenameTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest - */ - RenameTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.newTagTemplateFieldId != null) - message.newTagTemplateFieldId = String(object.newTagTemplateFieldId); - return message; - }; - - /** - * Creates a plain object from a RenameTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RenameTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.newTagTemplateFieldId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) - object.newTagTemplateFieldId = message.newTagTemplateFieldId; - return object; - }; - - /** - * Converts this RenameTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @instance - * @returns {Object.} JSON object - */ - RenameTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RenameTagTemplateFieldRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RenameTagTemplateFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest"; - }; - - return RenameTagTemplateFieldRequest; - })(); - - v1.RenameTagTemplateFieldEnumValueRequest = (function() { - - /** - * Properties of a RenameTagTemplateFieldEnumValueRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IRenameTagTemplateFieldEnumValueRequest - * @property {string|null} [name] RenameTagTemplateFieldEnumValueRequest name - * @property {string|null} [newEnumValueDisplayName] RenameTagTemplateFieldEnumValueRequest newEnumValueDisplayName - */ - - /** - * Constructs a new RenameTagTemplateFieldEnumValueRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a RenameTagTemplateFieldEnumValueRequest. - * @implements IRenameTagTemplateFieldEnumValueRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest=} [properties] Properties to set - */ - function RenameTagTemplateFieldEnumValueRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RenameTagTemplateFieldEnumValueRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @instance - */ - RenameTagTemplateFieldEnumValueRequest.prototype.name = ""; - - /** - * RenameTagTemplateFieldEnumValueRequest newEnumValueDisplayName. - * @member {string} newEnumValueDisplayName - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @instance - */ - RenameTagTemplateFieldEnumValueRequest.prototype.newEnumValueDisplayName = ""; - - /** - * Creates a new RenameTagTemplateFieldEnumValueRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest} RenameTagTemplateFieldEnumValueRequest instance - */ - RenameTagTemplateFieldEnumValueRequest.create = function create(properties) { - return new RenameTagTemplateFieldEnumValueRequest(properties); - }; - - /** - * Encodes the specified RenameTagTemplateFieldEnumValueRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest} message RenameTagTemplateFieldEnumValueRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RenameTagTemplateFieldEnumValueRequest.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.newEnumValueDisplayName != null && Object.hasOwnProperty.call(message, "newEnumValueDisplayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.newEnumValueDisplayName); - return writer; - }; - - /** - * Encodes the specified RenameTagTemplateFieldEnumValueRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest} message RenameTagTemplateFieldEnumValueRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RenameTagTemplateFieldEnumValueRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RenameTagTemplateFieldEnumValueRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest} RenameTagTemplateFieldEnumValueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RenameTagTemplateFieldEnumValueRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.newEnumValueDisplayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RenameTagTemplateFieldEnumValueRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest} RenameTagTemplateFieldEnumValueRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RenameTagTemplateFieldEnumValueRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RenameTagTemplateFieldEnumValueRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RenameTagTemplateFieldEnumValueRequest.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.newEnumValueDisplayName != null && message.hasOwnProperty("newEnumValueDisplayName")) - if (!$util.isString(message.newEnumValueDisplayName)) - return "newEnumValueDisplayName: string expected"; - return null; - }; - - /** - * Creates a RenameTagTemplateFieldEnumValueRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest} RenameTagTemplateFieldEnumValueRequest - */ - RenameTagTemplateFieldEnumValueRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.newEnumValueDisplayName != null) - message.newEnumValueDisplayName = String(object.newEnumValueDisplayName); - return message; - }; - - /** - * Creates a plain object from a RenameTagTemplateFieldEnumValueRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest} message RenameTagTemplateFieldEnumValueRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RenameTagTemplateFieldEnumValueRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.newEnumValueDisplayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.newEnumValueDisplayName != null && message.hasOwnProperty("newEnumValueDisplayName")) - object.newEnumValueDisplayName = message.newEnumValueDisplayName; - return object; - }; - - /** - * Converts this RenameTagTemplateFieldEnumValueRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @instance - * @returns {Object.} JSON object - */ - RenameTagTemplateFieldEnumValueRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RenameTagTemplateFieldEnumValueRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RenameTagTemplateFieldEnumValueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest"; - }; - - return RenameTagTemplateFieldEnumValueRequest; - })(); - - v1.DeleteTagTemplateFieldRequest = (function() { - - /** - * Properties of a DeleteTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IDeleteTagTemplateFieldRequest - * @property {string|null} [name] DeleteTagTemplateFieldRequest name - * @property {boolean|null} [force] DeleteTagTemplateFieldRequest force - */ - - /** - * Constructs a new DeleteTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DeleteTagTemplateFieldRequest. - * @implements IDeleteTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest=} [properties] Properties to set - */ - function DeleteTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTagTemplateFieldRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @instance - */ - DeleteTagTemplateFieldRequest.prototype.name = ""; - - /** - * DeleteTagTemplateFieldRequest force. - * @member {boolean} force - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @instance - */ - DeleteTagTemplateFieldRequest.prototype.force = false; - - /** - * Creates a new DeleteTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest instance - */ - DeleteTagTemplateFieldRequest.create = function create(properties) { - return new DeleteTagTemplateFieldRequest(properties); - }; - - /** - * Encodes the specified DeleteTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagTemplateFieldRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTagTemplateFieldRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest - */ - DeleteTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTagTemplateFieldRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTagTemplateFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest"; - }; - - return DeleteTagTemplateFieldRequest; - })(); - - v1.ListTagsRequest = (function() { - - /** - * Properties of a ListTagsRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IListTagsRequest - * @property {string|null} [parent] ListTagsRequest parent - * @property {number|null} [pageSize] ListTagsRequest pageSize - * @property {string|null} [pageToken] ListTagsRequest pageToken - */ - - /** - * Constructs a new ListTagsRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListTagsRequest. - * @implements IListTagsRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IListTagsRequest=} [properties] Properties to set - */ - function ListTagsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTagsRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.parent = ""; - - /** - * ListTagsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.pageSize = 0; - - /** - * ListTagsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListTagsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.IListTagsRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListTagsRequest} ListTagsRequest instance - */ - ListTagsRequest.create = function create(properties) { - return new ListTagsRequest(properties); - }; - - /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListTagsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.IListTagsRequest} message ListTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsRequest.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 ListTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListTagsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.IListTagsRequest} message ListTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListTagsRequest} ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListTagsRequest(); - 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 ListTagsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListTagsRequest} ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTagsRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTagsRequest.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 ListTagsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListTagsRequest} ListTagsRequest - */ - ListTagsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListTagsRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListTagsRequest(); - 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 ListTagsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.ListTagsRequest} message ListTagsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTagsRequest.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 ListTagsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @instance - * @returns {Object.} JSON object - */ - ListTagsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTagsRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListTagsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListTagsRequest"; - }; - - return ListTagsRequest; - })(); - - v1.ListTagsResponse = (function() { - - /** - * Properties of a ListTagsResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IListTagsResponse - * @property {Array.|null} [tags] ListTagsResponse tags - * @property {string|null} [nextPageToken] ListTagsResponse nextPageToken - */ - - /** - * Constructs a new ListTagsResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListTagsResponse. - * @implements IListTagsResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IListTagsResponse=} [properties] Properties to set - */ - function ListTagsResponse(properties) { - 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]]; - } - - /** - * ListTagsResponse tags. - * @member {Array.} tags - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @instance - */ - ListTagsResponse.prototype.tags = $util.emptyArray; - - /** - * ListTagsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @instance - */ - ListTagsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTagsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.IListTagsResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListTagsResponse} ListTagsResponse instance - */ - ListTagsResponse.create = function create(properties) { - return new ListTagsResponse(properties); - }; - - /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListTagsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.IListTagsResponse} message ListTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - $root.google.cloud.datacatalog.v1.Tag.encode(message.tags[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 ListTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListTagsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.IListTagsResponse} message ListTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListTagsResponse} ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListTagsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push($root.google.cloud.datacatalog.v1.Tag.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListTagsResponse} ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTagsResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTagsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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) { - var error = $root.google.cloud.datacatalog.v1.Tag.verify(message.tags[i]); - if (error) - return "tags." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListTagsResponse} ListTagsResponse - */ - ListTagsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListTagsResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListTagsResponse(); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.cloud.datacatalog.v1.ListTagsResponse.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) { - if (typeof object.tags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ListTagsResponse.tags: object expected"); - message.tags[i] = $root.google.cloud.datacatalog.v1.Tag.fromObject(object.tags[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.ListTagsResponse} message ListTagsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTagsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tags = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = $root.google.cloud.datacatalog.v1.Tag.toObject(message.tags[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListTagsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @instance - * @returns {Object.} JSON object - */ - ListTagsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTagsResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListTagsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListTagsResponse"; - }; - - return ListTagsResponse; - })(); - - v1.ListEntriesRequest = (function() { - - /** - * Properties of a ListEntriesRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IListEntriesRequest - * @property {string|null} [parent] ListEntriesRequest parent - * @property {number|null} [pageSize] ListEntriesRequest pageSize - * @property {string|null} [pageToken] ListEntriesRequest pageToken - * @property {google.protobuf.IFieldMask|null} [readMask] ListEntriesRequest readMask - */ - - /** - * Constructs a new ListEntriesRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListEntriesRequest. - * @implements IListEntriesRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IListEntriesRequest=} [properties] Properties to set - */ - function ListEntriesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntriesRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.parent = ""; - - /** - * ListEntriesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.pageSize = 0; - - /** - * ListEntriesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.pageToken = ""; - - /** - * ListEntriesRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.readMask = null; - - /** - * Creates a new ListEntriesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1.IListEntriesRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListEntriesRequest} ListEntriesRequest instance - */ - ListEntriesRequest.create = function create(properties) { - return new ListEntriesRequest(properties); - }; - - /** - * Encodes the specified ListEntriesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1.IListEntriesRequest} message ListEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntriesRequest.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.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1.IListEntriesRequest} message ListEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListEntriesRequest} ListEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntriesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListEntriesRequest(); - 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.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListEntriesRequest} ListEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntriesRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntriesRequest.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.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - return null; - }; - - /** - * Creates a ListEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListEntriesRequest} ListEntriesRequest - */ - ListEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListEntriesRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListEntriesRequest(); - 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.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ListEntriesRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - return message; - }; - - /** - * Creates a plain object from a ListEntriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1.ListEntriesRequest} message ListEntriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.readMask = null; - } - 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.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - return object; - }; - - /** - * Converts this ListEntriesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @instance - * @returns {Object.} JSON object - */ - ListEntriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntriesRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListEntriesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListEntriesRequest"; - }; - - return ListEntriesRequest; - })(); - - v1.ListEntriesResponse = (function() { - - /** - * Properties of a ListEntriesResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IListEntriesResponse - * @property {Array.|null} [entries] ListEntriesResponse entries - * @property {string|null} [nextPageToken] ListEntriesResponse nextPageToken - */ - - /** - * Constructs a new ListEntriesResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListEntriesResponse. - * @implements IListEntriesResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IListEntriesResponse=} [properties] Properties to set - */ - function ListEntriesResponse(properties) { - this.entries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntriesResponse entries. - * @member {Array.} entries - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @instance - */ - ListEntriesResponse.prototype.entries = $util.emptyArray; - - /** - * ListEntriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @instance - */ - ListEntriesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEntriesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1.IListEntriesResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListEntriesResponse} ListEntriesResponse instance - */ - ListEntriesResponse.create = function create(properties) { - return new ListEntriesResponse(properties); - }; - - /** - * Encodes the specified ListEntriesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntriesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1.IListEntriesResponse} message ListEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.datacatalog.v1.Entry.encode(message.entries[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 ListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListEntriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1.IListEntriesResponse} message ListEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListEntriesResponse} ListEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntriesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListEntriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.cloud.datacatalog.v1.Entry.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListEntriesResponse} ListEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntriesResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.Entry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListEntriesResponse} ListEntriesResponse - */ - ListEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListEntriesResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListEntriesResponse(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.cloud.datacatalog.v1.ListEntriesResponse.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ListEntriesResponse.entries: object expected"); - message.entries[i] = $root.google.cloud.datacatalog.v1.Entry.fromObject(object.entries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEntriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1.ListEntriesResponse} message ListEntriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.datacatalog.v1.Entry.toObject(message.entries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEntriesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @instance - * @returns {Object.} JSON object - */ - ListEntriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntriesResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListEntriesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListEntriesResponse"; - }; - - return ListEntriesResponse; - })(); - - v1.StarEntryRequest = (function() { - - /** - * Properties of a StarEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IStarEntryRequest - * @property {string|null} [name] StarEntryRequest name - */ - - /** - * Constructs a new StarEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a StarEntryRequest. - * @implements IStarEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IStarEntryRequest=} [properties] Properties to set - */ - function StarEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StarEntryRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @instance - */ - StarEntryRequest.prototype.name = ""; - - /** - * Creates a new StarEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IStarEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.StarEntryRequest} StarEntryRequest instance - */ - StarEntryRequest.create = function create(properties) { - return new StarEntryRequest(properties); - }; - - /** - * Encodes the specified StarEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.StarEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IStarEntryRequest} message StarEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StarEntryRequest.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 StarEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.StarEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IStarEntryRequest} message StarEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StarEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StarEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.StarEntryRequest} StarEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StarEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.StarEntryRequest(); - 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 StarEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.StarEntryRequest} StarEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StarEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StarEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StarEntryRequest.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 StarEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.StarEntryRequest} StarEntryRequest - */ - StarEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.StarEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.StarEntryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a StarEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.StarEntryRequest} message StarEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StarEntryRequest.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 StarEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @instance - * @returns {Object.} JSON object - */ - StarEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StarEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.StarEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StarEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.StarEntryRequest"; - }; - - return StarEntryRequest; - })(); - - v1.StarEntryResponse = (function() { - - /** - * Properties of a StarEntryResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IStarEntryResponse - */ - - /** - * Constructs a new StarEntryResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a StarEntryResponse. - * @implements IStarEntryResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IStarEntryResponse=} [properties] Properties to set - */ - function StarEntryResponse(properties) { - if (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 StarEntryResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @static - * @param {google.cloud.datacatalog.v1.IStarEntryResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.StarEntryResponse} StarEntryResponse instance - */ - StarEntryResponse.create = function create(properties) { - return new StarEntryResponse(properties); - }; - - /** - * Encodes the specified StarEntryResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.StarEntryResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @static - * @param {google.cloud.datacatalog.v1.IStarEntryResponse} message StarEntryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StarEntryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified StarEntryResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.StarEntryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @static - * @param {google.cloud.datacatalog.v1.IStarEntryResponse} message StarEntryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StarEntryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StarEntryResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.StarEntryResponse} StarEntryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StarEntryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.StarEntryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StarEntryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.StarEntryResponse} StarEntryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StarEntryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StarEntryResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StarEntryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StarEntryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.StarEntryResponse} StarEntryResponse - */ - StarEntryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.StarEntryResponse) - return object; - return new $root.google.cloud.datacatalog.v1.StarEntryResponse(); - }; - - /** - * Creates a plain object from a StarEntryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @static - * @param {google.cloud.datacatalog.v1.StarEntryResponse} message StarEntryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StarEntryResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StarEntryResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @instance - * @returns {Object.} JSON object - */ - StarEntryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StarEntryResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.StarEntryResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StarEntryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.StarEntryResponse"; - }; - - return StarEntryResponse; - })(); - - v1.UnstarEntryRequest = (function() { - - /** - * Properties of an UnstarEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IUnstarEntryRequest - * @property {string|null} [name] UnstarEntryRequest name - */ - - /** - * Constructs a new UnstarEntryRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an UnstarEntryRequest. - * @implements IUnstarEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IUnstarEntryRequest=} [properties] Properties to set - */ - function UnstarEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UnstarEntryRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @instance - */ - UnstarEntryRequest.prototype.name = ""; - - /** - * Creates a new UnstarEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IUnstarEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UnstarEntryRequest} UnstarEntryRequest instance - */ - UnstarEntryRequest.create = function create(properties) { - return new UnstarEntryRequest(properties); - }; - - /** - * Encodes the specified UnstarEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UnstarEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IUnstarEntryRequest} message UnstarEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnstarEntryRequest.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 UnstarEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UnstarEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.IUnstarEntryRequest} message UnstarEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnstarEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UnstarEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UnstarEntryRequest} UnstarEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnstarEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UnstarEntryRequest(); - 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 an UnstarEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UnstarEntryRequest} UnstarEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnstarEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnstarEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnstarEntryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates an UnstarEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UnstarEntryRequest} UnstarEntryRequest - */ - UnstarEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UnstarEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.UnstarEntryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from an UnstarEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @static - * @param {google.cloud.datacatalog.v1.UnstarEntryRequest} message UnstarEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnstarEntryRequest.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 UnstarEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @instance - * @returns {Object.} JSON object - */ - UnstarEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UnstarEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UnstarEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UnstarEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UnstarEntryRequest"; - }; - - return UnstarEntryRequest; - })(); - - v1.UnstarEntryResponse = (function() { - - /** - * Properties of an UnstarEntryResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IUnstarEntryResponse - */ - - /** - * Constructs a new UnstarEntryResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an UnstarEntryResponse. - * @implements IUnstarEntryResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IUnstarEntryResponse=} [properties] Properties to set - */ - function UnstarEntryResponse(properties) { - if (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 UnstarEntryResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @static - * @param {google.cloud.datacatalog.v1.IUnstarEntryResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UnstarEntryResponse} UnstarEntryResponse instance - */ - UnstarEntryResponse.create = function create(properties) { - return new UnstarEntryResponse(properties); - }; - - /** - * Encodes the specified UnstarEntryResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.UnstarEntryResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @static - * @param {google.cloud.datacatalog.v1.IUnstarEntryResponse} message UnstarEntryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnstarEntryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified UnstarEntryResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UnstarEntryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @static - * @param {google.cloud.datacatalog.v1.IUnstarEntryResponse} message UnstarEntryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnstarEntryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UnstarEntryResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UnstarEntryResponse} UnstarEntryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnstarEntryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UnstarEntryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UnstarEntryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UnstarEntryResponse} UnstarEntryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnstarEntryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnstarEntryResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnstarEntryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an UnstarEntryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UnstarEntryResponse} UnstarEntryResponse - */ - UnstarEntryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UnstarEntryResponse) - return object; - return new $root.google.cloud.datacatalog.v1.UnstarEntryResponse(); - }; - - /** - * Creates a plain object from an UnstarEntryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @static - * @param {google.cloud.datacatalog.v1.UnstarEntryResponse} message UnstarEntryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnstarEntryResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this UnstarEntryResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @instance - * @returns {Object.} JSON object - */ - UnstarEntryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UnstarEntryResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UnstarEntryResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UnstarEntryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UnstarEntryResponse"; - }; - - return UnstarEntryResponse; - })(); - - v1.ModifyEntryOverviewRequest = (function() { - - /** - * Properties of a ModifyEntryOverviewRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IModifyEntryOverviewRequest - * @property {string|null} [name] ModifyEntryOverviewRequest name - * @property {google.cloud.datacatalog.v1.IEntryOverview|null} [entryOverview] ModifyEntryOverviewRequest entryOverview - */ - - /** - * Constructs a new ModifyEntryOverviewRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ModifyEntryOverviewRequest. - * @implements IModifyEntryOverviewRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IModifyEntryOverviewRequest=} [properties] Properties to set - */ - function ModifyEntryOverviewRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModifyEntryOverviewRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @instance - */ - ModifyEntryOverviewRequest.prototype.name = ""; - - /** - * ModifyEntryOverviewRequest entryOverview. - * @member {google.cloud.datacatalog.v1.IEntryOverview|null|undefined} entryOverview - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @instance - */ - ModifyEntryOverviewRequest.prototype.entryOverview = null; - - /** - * Creates a new ModifyEntryOverviewRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @static - * @param {google.cloud.datacatalog.v1.IModifyEntryOverviewRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ModifyEntryOverviewRequest} ModifyEntryOverviewRequest instance - */ - ModifyEntryOverviewRequest.create = function create(properties) { - return new ModifyEntryOverviewRequest(properties); - }; - - /** - * Encodes the specified ModifyEntryOverviewRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ModifyEntryOverviewRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @static - * @param {google.cloud.datacatalog.v1.IModifyEntryOverviewRequest} message ModifyEntryOverviewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyEntryOverviewRequest.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.entryOverview != null && Object.hasOwnProperty.call(message, "entryOverview")) - $root.google.cloud.datacatalog.v1.EntryOverview.encode(message.entryOverview, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ModifyEntryOverviewRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ModifyEntryOverviewRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @static - * @param {google.cloud.datacatalog.v1.IModifyEntryOverviewRequest} message ModifyEntryOverviewRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyEntryOverviewRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModifyEntryOverviewRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ModifyEntryOverviewRequest} ModifyEntryOverviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyEntryOverviewRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.entryOverview = $root.google.cloud.datacatalog.v1.EntryOverview.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModifyEntryOverviewRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ModifyEntryOverviewRequest} ModifyEntryOverviewRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyEntryOverviewRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModifyEntryOverviewRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModifyEntryOverviewRequest.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.entryOverview != null && message.hasOwnProperty("entryOverview")) { - var error = $root.google.cloud.datacatalog.v1.EntryOverview.verify(message.entryOverview); - if (error) - return "entryOverview." + error; - } - return null; - }; - - /** - * Creates a ModifyEntryOverviewRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ModifyEntryOverviewRequest} ModifyEntryOverviewRequest - */ - ModifyEntryOverviewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.entryOverview != null) { - if (typeof object.entryOverview !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ModifyEntryOverviewRequest.entryOverview: object expected"); - message.entryOverview = $root.google.cloud.datacatalog.v1.EntryOverview.fromObject(object.entryOverview); - } - return message; - }; - - /** - * Creates a plain object from a ModifyEntryOverviewRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @static - * @param {google.cloud.datacatalog.v1.ModifyEntryOverviewRequest} message ModifyEntryOverviewRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModifyEntryOverviewRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.entryOverview = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.entryOverview != null && message.hasOwnProperty("entryOverview")) - object.entryOverview = $root.google.cloud.datacatalog.v1.EntryOverview.toObject(message.entryOverview, options); - return object; - }; - - /** - * Converts this ModifyEntryOverviewRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @instance - * @returns {Object.} JSON object - */ - ModifyEntryOverviewRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ModifyEntryOverviewRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ModifyEntryOverviewRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ModifyEntryOverviewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ModifyEntryOverviewRequest"; - }; - - return ModifyEntryOverviewRequest; - })(); - - v1.ModifyEntryContactsRequest = (function() { - - /** - * Properties of a ModifyEntryContactsRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IModifyEntryContactsRequest - * @property {string|null} [name] ModifyEntryContactsRequest name - * @property {google.cloud.datacatalog.v1.IContacts|null} [contacts] ModifyEntryContactsRequest contacts - */ - - /** - * Constructs a new ModifyEntryContactsRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ModifyEntryContactsRequest. - * @implements IModifyEntryContactsRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IModifyEntryContactsRequest=} [properties] Properties to set - */ - function ModifyEntryContactsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModifyEntryContactsRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @instance - */ - ModifyEntryContactsRequest.prototype.name = ""; - - /** - * ModifyEntryContactsRequest contacts. - * @member {google.cloud.datacatalog.v1.IContacts|null|undefined} contacts - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @instance - */ - ModifyEntryContactsRequest.prototype.contacts = null; - - /** - * Creates a new ModifyEntryContactsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @static - * @param {google.cloud.datacatalog.v1.IModifyEntryContactsRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ModifyEntryContactsRequest} ModifyEntryContactsRequest instance - */ - ModifyEntryContactsRequest.create = function create(properties) { - return new ModifyEntryContactsRequest(properties); - }; - - /** - * Encodes the specified ModifyEntryContactsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ModifyEntryContactsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @static - * @param {google.cloud.datacatalog.v1.IModifyEntryContactsRequest} message ModifyEntryContactsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyEntryContactsRequest.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.contacts != null && Object.hasOwnProperty.call(message, "contacts")) - $root.google.cloud.datacatalog.v1.Contacts.encode(message.contacts, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ModifyEntryContactsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ModifyEntryContactsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @static - * @param {google.cloud.datacatalog.v1.IModifyEntryContactsRequest} message ModifyEntryContactsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyEntryContactsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModifyEntryContactsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ModifyEntryContactsRequest} ModifyEntryContactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyEntryContactsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ModifyEntryContactsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.contacts = $root.google.cloud.datacatalog.v1.Contacts.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModifyEntryContactsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ModifyEntryContactsRequest} ModifyEntryContactsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyEntryContactsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModifyEntryContactsRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModifyEntryContactsRequest.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.contacts != null && message.hasOwnProperty("contacts")) { - var error = $root.google.cloud.datacatalog.v1.Contacts.verify(message.contacts); - if (error) - return "contacts." + error; - } - return null; - }; - - /** - * Creates a ModifyEntryContactsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ModifyEntryContactsRequest} ModifyEntryContactsRequest - */ - ModifyEntryContactsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ModifyEntryContactsRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ModifyEntryContactsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.contacts != null) { - if (typeof object.contacts !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ModifyEntryContactsRequest.contacts: object expected"); - message.contacts = $root.google.cloud.datacatalog.v1.Contacts.fromObject(object.contacts); - } - return message; - }; - - /** - * Creates a plain object from a ModifyEntryContactsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @static - * @param {google.cloud.datacatalog.v1.ModifyEntryContactsRequest} message ModifyEntryContactsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModifyEntryContactsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.contacts = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.contacts != null && message.hasOwnProperty("contacts")) - object.contacts = $root.google.cloud.datacatalog.v1.Contacts.toObject(message.contacts, options); - return object; - }; - - /** - * Converts this ModifyEntryContactsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @instance - * @returns {Object.} JSON object - */ - ModifyEntryContactsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ModifyEntryContactsRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ModifyEntryContactsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ModifyEntryContactsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ModifyEntryContactsRequest"; - }; - - return ModifyEntryContactsRequest; - })(); - - /** - * EntryType enum. - * @name google.cloud.datacatalog.v1.EntryType - * @enum {number} - * @property {number} ENTRY_TYPE_UNSPECIFIED=0 ENTRY_TYPE_UNSPECIFIED value - * @property {number} TABLE=2 TABLE value - * @property {number} MODEL=5 MODEL value - * @property {number} DATA_STREAM=3 DATA_STREAM value - * @property {number} FILESET=4 FILESET value - * @property {number} CLUSTER=6 CLUSTER value - * @property {number} DATABASE=7 DATABASE value - * @property {number} DATA_SOURCE_CONNECTION=8 DATA_SOURCE_CONNECTION value - * @property {number} ROUTINE=9 ROUTINE value - * @property {number} LAKE=10 LAKE value - * @property {number} ZONE=11 ZONE value - * @property {number} SERVICE=14 SERVICE value - */ - v1.EntryType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTRY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "TABLE"] = 2; - values[valuesById[5] = "MODEL"] = 5; - values[valuesById[3] = "DATA_STREAM"] = 3; - values[valuesById[4] = "FILESET"] = 4; - values[valuesById[6] = "CLUSTER"] = 6; - values[valuesById[7] = "DATABASE"] = 7; - values[valuesById[8] = "DATA_SOURCE_CONNECTION"] = 8; - values[valuesById[9] = "ROUTINE"] = 9; - values[valuesById[10] = "LAKE"] = 10; - values[valuesById[11] = "ZONE"] = 11; - values[valuesById[14] = "SERVICE"] = 14; - return values; - })(); - - v1.DataplexSpec = (function() { - - /** - * Properties of a DataplexSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IDataplexSpec - * @property {string|null} [asset] DataplexSpec asset - * @property {google.cloud.datacatalog.v1.IPhysicalSchema|null} [dataFormat] DataplexSpec dataFormat - * @property {string|null} [compressionFormat] DataplexSpec compressionFormat - * @property {string|null} [projectId] DataplexSpec projectId - */ - - /** - * Constructs a new DataplexSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DataplexSpec. - * @implements IDataplexSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IDataplexSpec=} [properties] Properties to set - */ - function DataplexSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataplexSpec asset. - * @member {string} asset - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @instance - */ - DataplexSpec.prototype.asset = ""; - - /** - * DataplexSpec dataFormat. - * @member {google.cloud.datacatalog.v1.IPhysicalSchema|null|undefined} dataFormat - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @instance - */ - DataplexSpec.prototype.dataFormat = null; - - /** - * DataplexSpec compressionFormat. - * @member {string} compressionFormat - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @instance - */ - DataplexSpec.prototype.compressionFormat = ""; - - /** - * DataplexSpec projectId. - * @member {string} projectId - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @instance - */ - DataplexSpec.prototype.projectId = ""; - - /** - * Creates a new DataplexSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataplexSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DataplexSpec} DataplexSpec instance - */ - DataplexSpec.create = function create(properties) { - return new DataplexSpec(properties); - }; - - /** - * Encodes the specified DataplexSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataplexSpec} message DataplexSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataplexSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.asset); - if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) - $root.google.cloud.datacatalog.v1.PhysicalSchema.encode(message.dataFormat, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.compressionFormat != null && Object.hasOwnProperty.call(message, "compressionFormat")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.compressionFormat); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); - return writer; - }; - - /** - * Encodes the specified DataplexSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataplexSpec} message DataplexSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataplexSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataplexSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DataplexSpec} DataplexSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataplexSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DataplexSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.asset = reader.string(); - break; - } - case 2: { - message.dataFormat = $root.google.cloud.datacatalog.v1.PhysicalSchema.decode(reader, reader.uint32()); - break; - } - case 3: { - message.compressionFormat = reader.string(); - break; - } - case 4: { - message.projectId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataplexSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DataplexSpec} DataplexSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataplexSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataplexSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataplexSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.asset != null && message.hasOwnProperty("asset")) - if (!$util.isString(message.asset)) - return "asset: string expected"; - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) { - var error = $root.google.cloud.datacatalog.v1.PhysicalSchema.verify(message.dataFormat); - if (error) - return "dataFormat." + error; - } - if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) - if (!$util.isString(message.compressionFormat)) - return "compressionFormat: string expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - return null; - }; - - /** - * Creates a DataplexSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DataplexSpec} DataplexSpec - */ - DataplexSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DataplexSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.DataplexSpec(); - if (object.asset != null) - message.asset = String(object.asset); - if (object.dataFormat != null) { - if (typeof object.dataFormat !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DataplexSpec.dataFormat: object expected"); - message.dataFormat = $root.google.cloud.datacatalog.v1.PhysicalSchema.fromObject(object.dataFormat); - } - if (object.compressionFormat != null) - message.compressionFormat = String(object.compressionFormat); - if (object.projectId != null) - message.projectId = String(object.projectId); - return message; - }; - - /** - * Creates a plain object from a DataplexSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @static - * @param {google.cloud.datacatalog.v1.DataplexSpec} message DataplexSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataplexSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.asset = ""; - object.dataFormat = null; - object.compressionFormat = ""; - object.projectId = ""; - } - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = message.asset; - if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) - object.dataFormat = $root.google.cloud.datacatalog.v1.PhysicalSchema.toObject(message.dataFormat, options); - if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) - object.compressionFormat = message.compressionFormat; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - return object; - }; - - /** - * Converts this DataplexSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @instance - * @returns {Object.} JSON object - */ - DataplexSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataplexSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DataplexSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataplexSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DataplexSpec"; - }; - - return DataplexSpec; - })(); - - v1.DataplexFilesetSpec = (function() { - - /** - * Properties of a DataplexFilesetSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IDataplexFilesetSpec - * @property {google.cloud.datacatalog.v1.IDataplexSpec|null} [dataplexSpec] DataplexFilesetSpec dataplexSpec - */ - - /** - * Constructs a new DataplexFilesetSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DataplexFilesetSpec. - * @implements IDataplexFilesetSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IDataplexFilesetSpec=} [properties] Properties to set - */ - function DataplexFilesetSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataplexFilesetSpec dataplexSpec. - * @member {google.cloud.datacatalog.v1.IDataplexSpec|null|undefined} dataplexSpec - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @instance - */ - DataplexFilesetSpec.prototype.dataplexSpec = null; - - /** - * Creates a new DataplexFilesetSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataplexFilesetSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DataplexFilesetSpec} DataplexFilesetSpec instance - */ - DataplexFilesetSpec.create = function create(properties) { - return new DataplexFilesetSpec(properties); - }; - - /** - * Encodes the specified DataplexFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexFilesetSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataplexFilesetSpec} message DataplexFilesetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataplexFilesetSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataplexSpec != null && Object.hasOwnProperty.call(message, "dataplexSpec")) - $root.google.cloud.datacatalog.v1.DataplexSpec.encode(message.dataplexSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataplexFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexFilesetSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataplexFilesetSpec} message DataplexFilesetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataplexFilesetSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataplexFilesetSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DataplexFilesetSpec} DataplexFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataplexFilesetSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DataplexFilesetSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataplexSpec = $root.google.cloud.datacatalog.v1.DataplexSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataplexFilesetSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DataplexFilesetSpec} DataplexFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataplexFilesetSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataplexFilesetSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataplexFilesetSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataplexSpec != null && message.hasOwnProperty("dataplexSpec")) { - var error = $root.google.cloud.datacatalog.v1.DataplexSpec.verify(message.dataplexSpec); - if (error) - return "dataplexSpec." + error; - } - return null; - }; - - /** - * Creates a DataplexFilesetSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DataplexFilesetSpec} DataplexFilesetSpec - */ - DataplexFilesetSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DataplexFilesetSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.DataplexFilesetSpec(); - if (object.dataplexSpec != null) { - if (typeof object.dataplexSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DataplexFilesetSpec.dataplexSpec: object expected"); - message.dataplexSpec = $root.google.cloud.datacatalog.v1.DataplexSpec.fromObject(object.dataplexSpec); - } - return message; - }; - - /** - * Creates a plain object from a DataplexFilesetSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.DataplexFilesetSpec} message DataplexFilesetSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataplexFilesetSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dataplexSpec = null; - if (message.dataplexSpec != null && message.hasOwnProperty("dataplexSpec")) - object.dataplexSpec = $root.google.cloud.datacatalog.v1.DataplexSpec.toObject(message.dataplexSpec, options); - return object; - }; - - /** - * Converts this DataplexFilesetSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @instance - * @returns {Object.} JSON object - */ - DataplexFilesetSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataplexFilesetSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DataplexFilesetSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataplexFilesetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DataplexFilesetSpec"; - }; - - return DataplexFilesetSpec; - })(); - - v1.DataplexTableSpec = (function() { - - /** - * Properties of a DataplexTableSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IDataplexTableSpec - * @property {Array.|null} [externalTables] DataplexTableSpec externalTables - * @property {google.cloud.datacatalog.v1.IDataplexSpec|null} [dataplexSpec] DataplexTableSpec dataplexSpec - * @property {boolean|null} [userManaged] DataplexTableSpec userManaged - */ - - /** - * Constructs a new DataplexTableSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DataplexTableSpec. - * @implements IDataplexTableSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IDataplexTableSpec=} [properties] Properties to set - */ - function DataplexTableSpec(properties) { - this.externalTables = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataplexTableSpec externalTables. - * @member {Array.} externalTables - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @instance - */ - DataplexTableSpec.prototype.externalTables = $util.emptyArray; - - /** - * DataplexTableSpec dataplexSpec. - * @member {google.cloud.datacatalog.v1.IDataplexSpec|null|undefined} dataplexSpec - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @instance - */ - DataplexTableSpec.prototype.dataplexSpec = null; - - /** - * DataplexTableSpec userManaged. - * @member {boolean} userManaged - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @instance - */ - DataplexTableSpec.prototype.userManaged = false; - - /** - * Creates a new DataplexTableSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataplexTableSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DataplexTableSpec} DataplexTableSpec instance - */ - DataplexTableSpec.create = function create(properties) { - return new DataplexTableSpec(properties); - }; - - /** - * Encodes the specified DataplexTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexTableSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataplexTableSpec} message DataplexTableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataplexTableSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.externalTables != null && message.externalTables.length) - for (var i = 0; i < message.externalTables.length; ++i) - $root.google.cloud.datacatalog.v1.DataplexExternalTable.encode(message.externalTables[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dataplexSpec != null && Object.hasOwnProperty.call(message, "dataplexSpec")) - $root.google.cloud.datacatalog.v1.DataplexSpec.encode(message.dataplexSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.userManaged != null && Object.hasOwnProperty.call(message, "userManaged")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.userManaged); - return writer; - }; - - /** - * Encodes the specified DataplexTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexTableSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @static - * @param {google.cloud.datacatalog.v1.IDataplexTableSpec} message DataplexTableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataplexTableSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataplexTableSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DataplexTableSpec} DataplexTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataplexTableSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DataplexTableSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.externalTables && message.externalTables.length)) - message.externalTables = []; - message.externalTables.push($root.google.cloud.datacatalog.v1.DataplexExternalTable.decode(reader, reader.uint32())); - break; - } - case 2: { - message.dataplexSpec = $root.google.cloud.datacatalog.v1.DataplexSpec.decode(reader, reader.uint32()); - break; - } - case 3: { - message.userManaged = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataplexTableSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DataplexTableSpec} DataplexTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataplexTableSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataplexTableSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataplexTableSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.externalTables != null && message.hasOwnProperty("externalTables")) { - if (!Array.isArray(message.externalTables)) - return "externalTables: array expected"; - for (var i = 0; i < message.externalTables.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.DataplexExternalTable.verify(message.externalTables[i]); - if (error) - return "externalTables." + error; - } - } - if (message.dataplexSpec != null && message.hasOwnProperty("dataplexSpec")) { - var error = $root.google.cloud.datacatalog.v1.DataplexSpec.verify(message.dataplexSpec); - if (error) - return "dataplexSpec." + error; - } - if (message.userManaged != null && message.hasOwnProperty("userManaged")) - if (typeof message.userManaged !== "boolean") - return "userManaged: boolean expected"; - return null; - }; - - /** - * Creates a DataplexTableSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DataplexTableSpec} DataplexTableSpec - */ - DataplexTableSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DataplexTableSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.DataplexTableSpec(); - if (object.externalTables) { - if (!Array.isArray(object.externalTables)) - throw TypeError(".google.cloud.datacatalog.v1.DataplexTableSpec.externalTables: array expected"); - message.externalTables = []; - for (var i = 0; i < object.externalTables.length; ++i) { - if (typeof object.externalTables[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DataplexTableSpec.externalTables: object expected"); - message.externalTables[i] = $root.google.cloud.datacatalog.v1.DataplexExternalTable.fromObject(object.externalTables[i]); - } - } - if (object.dataplexSpec != null) { - if (typeof object.dataplexSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.DataplexTableSpec.dataplexSpec: object expected"); - message.dataplexSpec = $root.google.cloud.datacatalog.v1.DataplexSpec.fromObject(object.dataplexSpec); - } - if (object.userManaged != null) - message.userManaged = Boolean(object.userManaged); - return message; - }; - - /** - * Creates a plain object from a DataplexTableSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @static - * @param {google.cloud.datacatalog.v1.DataplexTableSpec} message DataplexTableSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataplexTableSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.externalTables = []; - if (options.defaults) { - object.dataplexSpec = null; - object.userManaged = false; - } - if (message.externalTables && message.externalTables.length) { - object.externalTables = []; - for (var j = 0; j < message.externalTables.length; ++j) - object.externalTables[j] = $root.google.cloud.datacatalog.v1.DataplexExternalTable.toObject(message.externalTables[j], options); - } - if (message.dataplexSpec != null && message.hasOwnProperty("dataplexSpec")) - object.dataplexSpec = $root.google.cloud.datacatalog.v1.DataplexSpec.toObject(message.dataplexSpec, options); - if (message.userManaged != null && message.hasOwnProperty("userManaged")) - object.userManaged = message.userManaged; - return object; - }; - - /** - * Converts this DataplexTableSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @instance - * @returns {Object.} JSON object - */ - DataplexTableSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataplexTableSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DataplexTableSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataplexTableSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DataplexTableSpec"; - }; - - return DataplexTableSpec; - })(); - - v1.DataplexExternalTable = (function() { - - /** - * Properties of a DataplexExternalTable. - * @memberof google.cloud.datacatalog.v1 - * @interface IDataplexExternalTable - * @property {google.cloud.datacatalog.v1.IntegratedSystem|null} [system] DataplexExternalTable system - * @property {string|null} [fullyQualifiedName] DataplexExternalTable fullyQualifiedName - * @property {string|null} [googleCloudResource] DataplexExternalTable googleCloudResource - * @property {string|null} [dataCatalogEntry] DataplexExternalTable dataCatalogEntry - */ - - /** - * Constructs a new DataplexExternalTable. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DataplexExternalTable. - * @implements IDataplexExternalTable - * @constructor - * @param {google.cloud.datacatalog.v1.IDataplexExternalTable=} [properties] Properties to set - */ - function DataplexExternalTable(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataplexExternalTable system. - * @member {google.cloud.datacatalog.v1.IntegratedSystem} system - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @instance - */ - DataplexExternalTable.prototype.system = 0; - - /** - * DataplexExternalTable fullyQualifiedName. - * @member {string} fullyQualifiedName - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @instance - */ - DataplexExternalTable.prototype.fullyQualifiedName = ""; - - /** - * DataplexExternalTable googleCloudResource. - * @member {string} googleCloudResource - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @instance - */ - DataplexExternalTable.prototype.googleCloudResource = ""; - - /** - * DataplexExternalTable dataCatalogEntry. - * @member {string} dataCatalogEntry - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @instance - */ - DataplexExternalTable.prototype.dataCatalogEntry = ""; - - /** - * Creates a new DataplexExternalTable instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @static - * @param {google.cloud.datacatalog.v1.IDataplexExternalTable=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DataplexExternalTable} DataplexExternalTable instance - */ - DataplexExternalTable.create = function create(properties) { - return new DataplexExternalTable(properties); - }; - - /** - * Encodes the specified DataplexExternalTable message. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexExternalTable.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @static - * @param {google.cloud.datacatalog.v1.IDataplexExternalTable} message DataplexExternalTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataplexExternalTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.system != null && Object.hasOwnProperty.call(message, "system")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.system); - if (message.googleCloudResource != null && Object.hasOwnProperty.call(message, "googleCloudResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.googleCloudResource); - if (message.dataCatalogEntry != null && Object.hasOwnProperty.call(message, "dataCatalogEntry")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataCatalogEntry); - if (message.fullyQualifiedName != null && Object.hasOwnProperty.call(message, "fullyQualifiedName")) - writer.uint32(/* id 28, wireType 2 =*/226).string(message.fullyQualifiedName); - return writer; - }; - - /** - * Encodes the specified DataplexExternalTable message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DataplexExternalTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @static - * @param {google.cloud.datacatalog.v1.IDataplexExternalTable} message DataplexExternalTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataplexExternalTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataplexExternalTable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DataplexExternalTable} DataplexExternalTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataplexExternalTable.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DataplexExternalTable(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.system = reader.int32(); - break; - } - case 28: { - message.fullyQualifiedName = reader.string(); - break; - } - case 3: { - message.googleCloudResource = reader.string(); - break; - } - case 4: { - message.dataCatalogEntry = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataplexExternalTable message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DataplexExternalTable} DataplexExternalTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataplexExternalTable.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataplexExternalTable message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataplexExternalTable.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.system != null && message.hasOwnProperty("system")) - switch (message.system) { - default: - return "system: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) - if (!$util.isString(message.fullyQualifiedName)) - return "fullyQualifiedName: string expected"; - if (message.googleCloudResource != null && message.hasOwnProperty("googleCloudResource")) - if (!$util.isString(message.googleCloudResource)) - return "googleCloudResource: string expected"; - if (message.dataCatalogEntry != null && message.hasOwnProperty("dataCatalogEntry")) - if (!$util.isString(message.dataCatalogEntry)) - return "dataCatalogEntry: string expected"; - return null; - }; - - /** - * Creates a DataplexExternalTable message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DataplexExternalTable} DataplexExternalTable - */ - DataplexExternalTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DataplexExternalTable) - return object; - var message = new $root.google.cloud.datacatalog.v1.DataplexExternalTable(); - switch (object.system) { - default: - if (typeof object.system === "number") { - message.system = object.system; - break; - } - break; - case "INTEGRATED_SYSTEM_UNSPECIFIED": - case 0: - message.system = 0; - break; - case "BIGQUERY": - case 1: - message.system = 1; - break; - case "CLOUD_PUBSUB": - case 2: - message.system = 2; - break; - case "DATAPROC_METASTORE": - case 3: - message.system = 3; - break; - case "DATAPLEX": - case 4: - message.system = 4; - break; - } - if (object.fullyQualifiedName != null) - message.fullyQualifiedName = String(object.fullyQualifiedName); - if (object.googleCloudResource != null) - message.googleCloudResource = String(object.googleCloudResource); - if (object.dataCatalogEntry != null) - message.dataCatalogEntry = String(object.dataCatalogEntry); - return message; - }; - - /** - * Creates a plain object from a DataplexExternalTable message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @static - * @param {google.cloud.datacatalog.v1.DataplexExternalTable} message DataplexExternalTable - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataplexExternalTable.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.system = options.enums === String ? "INTEGRATED_SYSTEM_UNSPECIFIED" : 0; - object.googleCloudResource = ""; - object.dataCatalogEntry = ""; - object.fullyQualifiedName = ""; - } - if (message.system != null && message.hasOwnProperty("system")) - object.system = options.enums === String ? $root.google.cloud.datacatalog.v1.IntegratedSystem[message.system] === undefined ? message.system : $root.google.cloud.datacatalog.v1.IntegratedSystem[message.system] : message.system; - if (message.googleCloudResource != null && message.hasOwnProperty("googleCloudResource")) - object.googleCloudResource = message.googleCloudResource; - if (message.dataCatalogEntry != null && message.hasOwnProperty("dataCatalogEntry")) - object.dataCatalogEntry = message.dataCatalogEntry; - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) - object.fullyQualifiedName = message.fullyQualifiedName; - return object; - }; - - /** - * Converts this DataplexExternalTable to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @instance - * @returns {Object.} JSON object - */ - DataplexExternalTable.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataplexExternalTable - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DataplexExternalTable - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataplexExternalTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DataplexExternalTable"; - }; - - return DataplexExternalTable; - })(); - - v1.PhysicalSchema = (function() { - - /** - * Properties of a PhysicalSchema. - * @memberof google.cloud.datacatalog.v1 - * @interface IPhysicalSchema - * @property {google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema|null} [avro] PhysicalSchema avro - * @property {google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema|null} [thrift] PhysicalSchema thrift - * @property {google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema|null} [protobuf] PhysicalSchema protobuf - * @property {google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema|null} [parquet] PhysicalSchema parquet - * @property {google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema|null} [orc] PhysicalSchema orc - * @property {google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema|null} [csv] PhysicalSchema csv - */ - - /** - * Constructs a new PhysicalSchema. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a PhysicalSchema. - * @implements IPhysicalSchema - * @constructor - * @param {google.cloud.datacatalog.v1.IPhysicalSchema=} [properties] Properties to set - */ - function PhysicalSchema(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhysicalSchema avro. - * @member {google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema|null|undefined} avro - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @instance - */ - PhysicalSchema.prototype.avro = null; - - /** - * PhysicalSchema thrift. - * @member {google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema|null|undefined} thrift - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @instance - */ - PhysicalSchema.prototype.thrift = null; - - /** - * PhysicalSchema protobuf. - * @member {google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema|null|undefined} protobuf - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @instance - */ - PhysicalSchema.prototype.protobuf = null; - - /** - * PhysicalSchema parquet. - * @member {google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema|null|undefined} parquet - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @instance - */ - PhysicalSchema.prototype.parquet = null; - - /** - * PhysicalSchema orc. - * @member {google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema|null|undefined} orc - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @instance - */ - PhysicalSchema.prototype.orc = null; - - /** - * PhysicalSchema csv. - * @member {google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema|null|undefined} csv - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @instance - */ - PhysicalSchema.prototype.csv = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PhysicalSchema schema. - * @member {"avro"|"thrift"|"protobuf"|"parquet"|"orc"|"csv"|undefined} schema - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @instance - */ - Object.defineProperty(PhysicalSchema.prototype, "schema", { - get: $util.oneOfGetter($oneOfFields = ["avro", "thrift", "protobuf", "parquet", "orc", "csv"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PhysicalSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @static - * @param {google.cloud.datacatalog.v1.IPhysicalSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.PhysicalSchema} PhysicalSchema instance - */ - PhysicalSchema.create = function create(properties) { - return new PhysicalSchema(properties); - }; - - /** - * Encodes the specified PhysicalSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @static - * @param {google.cloud.datacatalog.v1.IPhysicalSchema} message PhysicalSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhysicalSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.avro != null && Object.hasOwnProperty.call(message, "avro")) - $root.google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema.encode(message.avro, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.thrift != null && Object.hasOwnProperty.call(message, "thrift")) - $root.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.encode(message.thrift, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.protobuf != null && Object.hasOwnProperty.call(message, "protobuf")) - $root.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema.encode(message.protobuf, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.parquet != null && Object.hasOwnProperty.call(message, "parquet")) - $root.google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema.encode(message.parquet, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.orc != null && Object.hasOwnProperty.call(message, "orc")) - $root.google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema.encode(message.orc, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.csv != null && Object.hasOwnProperty.call(message, "csv")) - $root.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.encode(message.csv, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhysicalSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @static - * @param {google.cloud.datacatalog.v1.IPhysicalSchema} message PhysicalSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhysicalSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhysicalSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.PhysicalSchema} PhysicalSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhysicalSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.PhysicalSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.avro = $root.google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema.decode(reader, reader.uint32()); - break; - } - case 2: { - message.thrift = $root.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.decode(reader, reader.uint32()); - break; - } - case 3: { - message.protobuf = $root.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema.decode(reader, reader.uint32()); - break; - } - case 4: { - message.parquet = $root.google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema.decode(reader, reader.uint32()); - break; - } - case 5: { - message.orc = $root.google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema.decode(reader, reader.uint32()); - break; - } - case 6: { - message.csv = $root.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhysicalSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.PhysicalSchema} PhysicalSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhysicalSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhysicalSchema message. - * @function verify - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhysicalSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.avro != null && message.hasOwnProperty("avro")) { - properties.schema = 1; - { - var error = $root.google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema.verify(message.avro); - if (error) - return "avro." + error; - } - } - if (message.thrift != null && message.hasOwnProperty("thrift")) { - if (properties.schema === 1) - return "schema: multiple values"; - properties.schema = 1; - { - var error = $root.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.verify(message.thrift); - if (error) - return "thrift." + error; - } - } - if (message.protobuf != null && message.hasOwnProperty("protobuf")) { - if (properties.schema === 1) - return "schema: multiple values"; - properties.schema = 1; - { - var error = $root.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema.verify(message.protobuf); - if (error) - return "protobuf." + error; - } - } - if (message.parquet != null && message.hasOwnProperty("parquet")) { - if (properties.schema === 1) - return "schema: multiple values"; - properties.schema = 1; - { - var error = $root.google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema.verify(message.parquet); - if (error) - return "parquet." + error; - } - } - if (message.orc != null && message.hasOwnProperty("orc")) { - if (properties.schema === 1) - return "schema: multiple values"; - properties.schema = 1; - { - var error = $root.google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema.verify(message.orc); - if (error) - return "orc." + error; - } - } - if (message.csv != null && message.hasOwnProperty("csv")) { - if (properties.schema === 1) - return "schema: multiple values"; - properties.schema = 1; - { - var error = $root.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.verify(message.csv); - if (error) - return "csv." + error; - } - } - return null; - }; - - /** - * Creates a PhysicalSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.PhysicalSchema} PhysicalSchema - */ - PhysicalSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.PhysicalSchema) - return object; - var message = new $root.google.cloud.datacatalog.v1.PhysicalSchema(); - if (object.avro != null) { - if (typeof object.avro !== "object") - throw TypeError(".google.cloud.datacatalog.v1.PhysicalSchema.avro: object expected"); - message.avro = $root.google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema.fromObject(object.avro); - } - if (object.thrift != null) { - if (typeof object.thrift !== "object") - throw TypeError(".google.cloud.datacatalog.v1.PhysicalSchema.thrift: object expected"); - message.thrift = $root.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.fromObject(object.thrift); - } - if (object.protobuf != null) { - if (typeof object.protobuf !== "object") - throw TypeError(".google.cloud.datacatalog.v1.PhysicalSchema.protobuf: object expected"); - message.protobuf = $root.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema.fromObject(object.protobuf); - } - if (object.parquet != null) { - if (typeof object.parquet !== "object") - throw TypeError(".google.cloud.datacatalog.v1.PhysicalSchema.parquet: object expected"); - message.parquet = $root.google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema.fromObject(object.parquet); - } - if (object.orc != null) { - if (typeof object.orc !== "object") - throw TypeError(".google.cloud.datacatalog.v1.PhysicalSchema.orc: object expected"); - message.orc = $root.google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema.fromObject(object.orc); - } - if (object.csv != null) { - if (typeof object.csv !== "object") - throw TypeError(".google.cloud.datacatalog.v1.PhysicalSchema.csv: object expected"); - message.csv = $root.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.fromObject(object.csv); - } - return message; - }; - - /** - * Creates a plain object from a PhysicalSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema} message PhysicalSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhysicalSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.avro != null && message.hasOwnProperty("avro")) { - object.avro = $root.google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema.toObject(message.avro, options); - if (options.oneofs) - object.schema = "avro"; - } - if (message.thrift != null && message.hasOwnProperty("thrift")) { - object.thrift = $root.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.toObject(message.thrift, options); - if (options.oneofs) - object.schema = "thrift"; - } - if (message.protobuf != null && message.hasOwnProperty("protobuf")) { - object.protobuf = $root.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema.toObject(message.protobuf, options); - if (options.oneofs) - object.schema = "protobuf"; - } - if (message.parquet != null && message.hasOwnProperty("parquet")) { - object.parquet = $root.google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema.toObject(message.parquet, options); - if (options.oneofs) - object.schema = "parquet"; - } - if (message.orc != null && message.hasOwnProperty("orc")) { - object.orc = $root.google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema.toObject(message.orc, options); - if (options.oneofs) - object.schema = "orc"; - } - if (message.csv != null && message.hasOwnProperty("csv")) { - object.csv = $root.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.toObject(message.csv, options); - if (options.oneofs) - object.schema = "csv"; - } - return object; - }; - - /** - * Converts this PhysicalSchema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @instance - * @returns {Object.} JSON object - */ - PhysicalSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhysicalSchema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhysicalSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.PhysicalSchema"; - }; - - PhysicalSchema.AvroSchema = (function() { - - /** - * Properties of an AvroSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @interface IAvroSchema - * @property {string|null} [text] AvroSchema text - */ - - /** - * Constructs a new AvroSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @classdesc Represents an AvroSchema. - * @implements IAvroSchema - * @constructor - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema=} [properties] Properties to set - */ - function AvroSchema(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AvroSchema text. - * @member {string} text - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @instance - */ - AvroSchema.prototype.text = ""; - - /** - * Creates a new AvroSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema} AvroSchema instance - */ - AvroSchema.create = function create(properties) { - return new AvroSchema(properties); - }; - - /** - * Encodes the specified AvroSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema} message AvroSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - return writer; - }; - - /** - * Encodes the specified AvroSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IAvroSchema} message AvroSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AvroSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema} AvroSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AvroSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema} AvroSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AvroSchema message. - * @function verify - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AvroSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - return null; - }; - - /** - * Creates an AvroSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema} AvroSchema - */ - AvroSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema) - return object; - var message = new $root.google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema(); - if (object.text != null) - message.text = String(object.text); - return message; - }; - - /** - * Creates a plain object from an AvroSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema} message AvroSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AvroSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; - - /** - * Converts this AvroSchema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @instance - * @returns {Object.} JSON object - */ - AvroSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AvroSchema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AvroSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.PhysicalSchema.AvroSchema"; - }; - - return AvroSchema; - })(); - - PhysicalSchema.ThriftSchema = (function() { - - /** - * Properties of a ThriftSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @interface IThriftSchema - * @property {string|null} [text] ThriftSchema text - */ - - /** - * Constructs a new ThriftSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @classdesc Represents a ThriftSchema. - * @implements IThriftSchema - * @constructor - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema=} [properties] Properties to set - */ - function ThriftSchema(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ThriftSchema text. - * @member {string} text - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @instance - */ - ThriftSchema.prototype.text = ""; - - /** - * Creates a new ThriftSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema} ThriftSchema instance - */ - ThriftSchema.create = function create(properties) { - return new ThriftSchema(properties); - }; - - /** - * Encodes the specified ThriftSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema} message ThriftSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ThriftSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - return writer; - }; - - /** - * Encodes the specified ThriftSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IThriftSchema} message ThriftSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ThriftSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ThriftSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema} ThriftSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ThriftSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ThriftSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema} ThriftSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ThriftSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ThriftSchema message. - * @function verify - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ThriftSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - return null; - }; - - /** - * Creates a ThriftSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema} ThriftSchema - */ - ThriftSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema) - return object; - var message = new $root.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema(); - if (object.text != null) - message.text = String(object.text); - return message; - }; - - /** - * Creates a plain object from a ThriftSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema} message ThriftSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ThriftSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; - - /** - * Converts this ThriftSchema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @instance - * @returns {Object.} JSON object - */ - ThriftSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ThriftSchema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ThriftSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema"; - }; - - return ThriftSchema; - })(); - - PhysicalSchema.ProtobufSchema = (function() { - - /** - * Properties of a ProtobufSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @interface IProtobufSchema - * @property {string|null} [text] ProtobufSchema text - */ - - /** - * Constructs a new ProtobufSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @classdesc Represents a ProtobufSchema. - * @implements IProtobufSchema - * @constructor - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema=} [properties] Properties to set - */ - function ProtobufSchema(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProtobufSchema text. - * @member {string} text - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @instance - */ - ProtobufSchema.prototype.text = ""; - - /** - * Creates a new ProtobufSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema} ProtobufSchema instance - */ - ProtobufSchema.create = function create(properties) { - return new ProtobufSchema(properties); - }; - - /** - * Encodes the specified ProtobufSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema} message ProtobufSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProtobufSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - return writer; - }; - - /** - * Encodes the specified ProtobufSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IProtobufSchema} message ProtobufSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProtobufSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProtobufSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema} ProtobufSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProtobufSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProtobufSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema} ProtobufSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProtobufSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProtobufSchema message. - * @function verify - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProtobufSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - return null; - }; - - /** - * Creates a ProtobufSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema} ProtobufSchema - */ - ProtobufSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema) - return object; - var message = new $root.google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema(); - if (object.text != null) - message.text = String(object.text); - return message; - }; - - /** - * Creates a plain object from a ProtobufSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema} message ProtobufSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProtobufSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - return object; - }; - - /** - * Converts this ProtobufSchema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @instance - * @returns {Object.} JSON object - */ - ProtobufSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProtobufSchema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProtobufSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.PhysicalSchema.ProtobufSchema"; - }; - - return ProtobufSchema; - })(); - - PhysicalSchema.ParquetSchema = (function() { - - /** - * Properties of a ParquetSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @interface IParquetSchema - */ - - /** - * Constructs a new ParquetSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @classdesc Represents a ParquetSchema. - * @implements IParquetSchema - * @constructor - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema=} [properties] Properties to set - */ - function ParquetSchema(properties) { - if (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 ParquetSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema} ParquetSchema instance - */ - ParquetSchema.create = function create(properties) { - return new ParquetSchema(properties); - }; - - /** - * Encodes the specified ParquetSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema} message ParquetSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParquetSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ParquetSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IParquetSchema} message ParquetSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParquetSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ParquetSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema} ParquetSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParquetSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ParquetSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema} ParquetSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParquetSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParquetSchema message. - * @function verify - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParquetSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ParquetSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema} ParquetSchema - */ - ParquetSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema) - return object; - return new $root.google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema(); - }; - - /** - * Creates a plain object from a ParquetSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema} message ParquetSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParquetSchema.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ParquetSchema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @instance - * @returns {Object.} JSON object - */ - ParquetSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ParquetSchema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ParquetSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.PhysicalSchema.ParquetSchema"; - }; - - return ParquetSchema; - })(); - - PhysicalSchema.OrcSchema = (function() { - - /** - * Properties of an OrcSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @interface IOrcSchema - */ - - /** - * Constructs a new OrcSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @classdesc Represents an OrcSchema. - * @implements IOrcSchema - * @constructor - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema=} [properties] Properties to set - */ - function OrcSchema(properties) { - if (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 OrcSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema} OrcSchema instance - */ - OrcSchema.create = function create(properties) { - return new OrcSchema(properties); - }; - - /** - * Encodes the specified OrcSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema} message OrcSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrcSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified OrcSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.IOrcSchema} message OrcSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrcSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OrcSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema} OrcSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrcSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OrcSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema} OrcSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrcSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OrcSchema message. - * @function verify - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OrcSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an OrcSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema} OrcSchema - */ - OrcSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema) - return object; - return new $root.google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema(); - }; - - /** - * Creates a plain object from an OrcSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema} message OrcSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OrcSchema.toObject = function toObject() { - return {}; - }; - - /** - * Converts this OrcSchema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @instance - * @returns {Object.} JSON object - */ - OrcSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OrcSchema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OrcSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.PhysicalSchema.OrcSchema"; - }; - - return OrcSchema; - })(); - - PhysicalSchema.CsvSchema = (function() { - - /** - * Properties of a CsvSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @interface ICsvSchema - */ - - /** - * Constructs a new CsvSchema. - * @memberof google.cloud.datacatalog.v1.PhysicalSchema - * @classdesc Represents a CsvSchema. - * @implements ICsvSchema - * @constructor - * @param {google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema=} [properties] Properties to set - */ - function CsvSchema(properties) { - if (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 CsvSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema} CsvSchema instance - */ - CsvSchema.create = function create(properties) { - return new CsvSchema(properties); - }; - - /** - * Encodes the specified CsvSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema} message CsvSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified CsvSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.ICsvSchema} message CsvSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CsvSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema} CsvSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CsvSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema} CsvSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CsvSchema message. - * @function verify - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CsvSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a CsvSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema} CsvSchema - */ - CsvSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema) - return object; - return new $root.google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema(); - }; - - /** - * Creates a plain object from a CsvSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @static - * @param {google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema} message CsvSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CsvSchema.toObject = function toObject() { - return {}; - }; - - /** - * Converts this CsvSchema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @instance - * @returns {Object.} JSON object - */ - CsvSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CsvSchema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CsvSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.PhysicalSchema.CsvSchema"; - }; - - return CsvSchema; - })(); - - return PhysicalSchema; - })(); - - v1.GcsFilesetSpec = (function() { - - /** - * Properties of a GcsFilesetSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IGcsFilesetSpec - * @property {Array.|null} [filePatterns] GcsFilesetSpec filePatterns - * @property {Array.|null} [sampleGcsFileSpecs] GcsFilesetSpec sampleGcsFileSpecs - */ - - /** - * Constructs a new GcsFilesetSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a GcsFilesetSpec. - * @implements IGcsFilesetSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IGcsFilesetSpec=} [properties] Properties to set - */ - function GcsFilesetSpec(properties) { - this.filePatterns = []; - this.sampleGcsFileSpecs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcsFilesetSpec filePatterns. - * @member {Array.} filePatterns - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @instance - */ - GcsFilesetSpec.prototype.filePatterns = $util.emptyArray; - - /** - * GcsFilesetSpec sampleGcsFileSpecs. - * @member {Array.} sampleGcsFileSpecs - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @instance - */ - GcsFilesetSpec.prototype.sampleGcsFileSpecs = $util.emptyArray; - - /** - * Creates a new GcsFilesetSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.IGcsFilesetSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.GcsFilesetSpec} GcsFilesetSpec instance - */ - GcsFilesetSpec.create = function create(properties) { - return new GcsFilesetSpec(properties); - }; - - /** - * Encodes the specified GcsFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.GcsFilesetSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.IGcsFilesetSpec} message GcsFilesetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFilesetSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filePatterns != null && message.filePatterns.length) - for (var i = 0; i < message.filePatterns.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePatterns[i]); - if (message.sampleGcsFileSpecs != null && message.sampleGcsFileSpecs.length) - for (var i = 0; i < message.sampleGcsFileSpecs.length; ++i) - $root.google.cloud.datacatalog.v1.GcsFileSpec.encode(message.sampleGcsFileSpecs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GcsFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GcsFilesetSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.IGcsFilesetSpec} message GcsFilesetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFilesetSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.GcsFilesetSpec} GcsFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFilesetSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.GcsFilesetSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.filePatterns && message.filePatterns.length)) - message.filePatterns = []; - message.filePatterns.push(reader.string()); - break; - } - case 2: { - if (!(message.sampleGcsFileSpecs && message.sampleGcsFileSpecs.length)) - message.sampleGcsFileSpecs = []; - message.sampleGcsFileSpecs.push($root.google.cloud.datacatalog.v1.GcsFileSpec.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.GcsFilesetSpec} GcsFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFilesetSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsFilesetSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsFilesetSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filePatterns != null && message.hasOwnProperty("filePatterns")) { - if (!Array.isArray(message.filePatterns)) - return "filePatterns: array expected"; - for (var i = 0; i < message.filePatterns.length; ++i) - if (!$util.isString(message.filePatterns[i])) - return "filePatterns: string[] expected"; - } - if (message.sampleGcsFileSpecs != null && message.hasOwnProperty("sampleGcsFileSpecs")) { - if (!Array.isArray(message.sampleGcsFileSpecs)) - return "sampleGcsFileSpecs: array expected"; - for (var i = 0; i < message.sampleGcsFileSpecs.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.GcsFileSpec.verify(message.sampleGcsFileSpecs[i]); - if (error) - return "sampleGcsFileSpecs." + error; - } - } - return null; - }; - - /** - * Creates a GcsFilesetSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.GcsFilesetSpec} GcsFilesetSpec - */ - GcsFilesetSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.GcsFilesetSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.GcsFilesetSpec(); - if (object.filePatterns) { - if (!Array.isArray(object.filePatterns)) - throw TypeError(".google.cloud.datacatalog.v1.GcsFilesetSpec.filePatterns: array expected"); - message.filePatterns = []; - for (var i = 0; i < object.filePatterns.length; ++i) - message.filePatterns[i] = String(object.filePatterns[i]); - } - if (object.sampleGcsFileSpecs) { - if (!Array.isArray(object.sampleGcsFileSpecs)) - throw TypeError(".google.cloud.datacatalog.v1.GcsFilesetSpec.sampleGcsFileSpecs: array expected"); - message.sampleGcsFileSpecs = []; - for (var i = 0; i < object.sampleGcsFileSpecs.length; ++i) { - if (typeof object.sampleGcsFileSpecs[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.GcsFilesetSpec.sampleGcsFileSpecs: object expected"); - message.sampleGcsFileSpecs[i] = $root.google.cloud.datacatalog.v1.GcsFileSpec.fromObject(object.sampleGcsFileSpecs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GcsFilesetSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1.GcsFilesetSpec} message GcsFilesetSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsFilesetSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.filePatterns = []; - object.sampleGcsFileSpecs = []; - } - if (message.filePatterns && message.filePatterns.length) { - object.filePatterns = []; - for (var j = 0; j < message.filePatterns.length; ++j) - object.filePatterns[j] = message.filePatterns[j]; - } - if (message.sampleGcsFileSpecs && message.sampleGcsFileSpecs.length) { - object.sampleGcsFileSpecs = []; - for (var j = 0; j < message.sampleGcsFileSpecs.length; ++j) - object.sampleGcsFileSpecs[j] = $root.google.cloud.datacatalog.v1.GcsFileSpec.toObject(message.sampleGcsFileSpecs[j], options); - } - return object; - }; - - /** - * Converts this GcsFilesetSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @instance - * @returns {Object.} JSON object - */ - GcsFilesetSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsFilesetSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.GcsFilesetSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsFilesetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.GcsFilesetSpec"; - }; - - return GcsFilesetSpec; - })(); - - v1.GcsFileSpec = (function() { - - /** - * Properties of a GcsFileSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IGcsFileSpec - * @property {string|null} [filePath] GcsFileSpec filePath - * @property {google.cloud.datacatalog.v1.ISystemTimestamps|null} [gcsTimestamps] GcsFileSpec gcsTimestamps - * @property {number|Long|null} [sizeBytes] GcsFileSpec sizeBytes - */ - - /** - * Constructs a new GcsFileSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a GcsFileSpec. - * @implements IGcsFileSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IGcsFileSpec=} [properties] Properties to set - */ - function GcsFileSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcsFileSpec filePath. - * @member {string} filePath - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @instance - */ - GcsFileSpec.prototype.filePath = ""; - - /** - * GcsFileSpec gcsTimestamps. - * @member {google.cloud.datacatalog.v1.ISystemTimestamps|null|undefined} gcsTimestamps - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @instance - */ - GcsFileSpec.prototype.gcsTimestamps = null; - - /** - * GcsFileSpec sizeBytes. - * @member {number|Long} sizeBytes - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @instance - */ - GcsFileSpec.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new GcsFileSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @static - * @param {google.cloud.datacatalog.v1.IGcsFileSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.GcsFileSpec} GcsFileSpec instance - */ - GcsFileSpec.create = function create(properties) { - return new GcsFileSpec(properties); - }; - - /** - * Encodes the specified GcsFileSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.GcsFileSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @static - * @param {google.cloud.datacatalog.v1.IGcsFileSpec} message GcsFileSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFileSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filePath != null && Object.hasOwnProperty.call(message, "filePath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePath); - if (message.gcsTimestamps != null && Object.hasOwnProperty.call(message, "gcsTimestamps")) - $root.google.cloud.datacatalog.v1.SystemTimestamps.encode(message.gcsTimestamps, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.sizeBytes); - return writer; - }; - - /** - * Encodes the specified GcsFileSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GcsFileSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @static - * @param {google.cloud.datacatalog.v1.IGcsFileSpec} message GcsFileSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFileSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsFileSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.GcsFileSpec} GcsFileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFileSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.GcsFileSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.filePath = reader.string(); - break; - } - case 2: { - message.gcsTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.decode(reader, reader.uint32()); - break; - } - case 4: { - message.sizeBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsFileSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.GcsFileSpec} GcsFileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFileSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsFileSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsFileSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filePath != null && message.hasOwnProperty("filePath")) - if (!$util.isString(message.filePath)) - return "filePath: string expected"; - if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) { - var error = $root.google.cloud.datacatalog.v1.SystemTimestamps.verify(message.gcsTimestamps); - if (error) - return "gcsTimestamps." + error; - } - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) - return "sizeBytes: integer|Long expected"; - return null; - }; - - /** - * Creates a GcsFileSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.GcsFileSpec} GcsFileSpec - */ - GcsFileSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.GcsFileSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.GcsFileSpec(); - if (object.filePath != null) - message.filePath = String(object.filePath); - if (object.gcsTimestamps != null) { - if (typeof object.gcsTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1.GcsFileSpec.gcsTimestamps: object expected"); - message.gcsTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.fromObject(object.gcsTimestamps); - } - if (object.sizeBytes != null) - if ($util.Long) - (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; - else if (typeof object.sizeBytes === "string") - message.sizeBytes = parseInt(object.sizeBytes, 10); - else if (typeof object.sizeBytes === "number") - message.sizeBytes = object.sizeBytes; - else if (typeof object.sizeBytes === "object") - message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a GcsFileSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @static - * @param {google.cloud.datacatalog.v1.GcsFileSpec} message GcsFileSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsFileSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filePath = ""; - object.gcsTimestamps = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sizeBytes = options.longs === String ? "0" : 0; - } - if (message.filePath != null && message.hasOwnProperty("filePath")) - object.filePath = message.filePath; - if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) - object.gcsTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.toObject(message.gcsTimestamps, options); - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (typeof message.sizeBytes === "number") - object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; - else - object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; - return object; - }; - - /** - * Converts this GcsFileSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @instance - * @returns {Object.} JSON object - */ - GcsFileSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsFileSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.GcsFileSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsFileSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.GcsFileSpec"; - }; - - return GcsFileSpec; - })(); - - v1.SystemTimestamps = (function() { - - /** - * Properties of a SystemTimestamps. - * @memberof google.cloud.datacatalog.v1 - * @interface ISystemTimestamps - * @property {google.protobuf.ITimestamp|null} [createTime] SystemTimestamps createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] SystemTimestamps updateTime - * @property {google.protobuf.ITimestamp|null} [expireTime] SystemTimestamps expireTime - */ - - /** - * Constructs a new SystemTimestamps. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a SystemTimestamps. - * @implements ISystemTimestamps - * @constructor - * @param {google.cloud.datacatalog.v1.ISystemTimestamps=} [properties] Properties to set - */ - function SystemTimestamps(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SystemTimestamps createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @instance - */ - SystemTimestamps.prototype.createTime = null; - - /** - * SystemTimestamps updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @instance - */ - SystemTimestamps.prototype.updateTime = null; - - /** - * SystemTimestamps expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @instance - */ - SystemTimestamps.prototype.expireTime = null; - - /** - * Creates a new SystemTimestamps instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @static - * @param {google.cloud.datacatalog.v1.ISystemTimestamps=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.SystemTimestamps} SystemTimestamps instance - */ - SystemTimestamps.create = function create(properties) { - return new SystemTimestamps(properties); - }; - - /** - * Encodes the specified SystemTimestamps message. Does not implicitly {@link google.cloud.datacatalog.v1.SystemTimestamps.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @static - * @param {google.cloud.datacatalog.v1.ISystemTimestamps} message SystemTimestamps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SystemTimestamps.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SystemTimestamps message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SystemTimestamps.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @static - * @param {google.cloud.datacatalog.v1.ISystemTimestamps} message SystemTimestamps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SystemTimestamps.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SystemTimestamps message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.SystemTimestamps} SystemTimestamps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SystemTimestamps.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.SystemTimestamps(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SystemTimestamps message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.SystemTimestamps} SystemTimestamps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SystemTimestamps.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SystemTimestamps message. - * @function verify - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SystemTimestamps.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - return null; - }; - - /** - * Creates a SystemTimestamps message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.SystemTimestamps} SystemTimestamps - */ - SystemTimestamps.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.SystemTimestamps) - return object; - var message = new $root.google.cloud.datacatalog.v1.SystemTimestamps(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1.SystemTimestamps.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.datacatalog.v1.SystemTimestamps.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1.SystemTimestamps.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - return message; - }; - - /** - * Creates a plain object from a SystemTimestamps message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @static - * @param {google.cloud.datacatalog.v1.SystemTimestamps} message SystemTimestamps - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SystemTimestamps.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.updateTime = null; - object.expireTime = null; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - return object; - }; - - /** - * Converts this SystemTimestamps to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @instance - * @returns {Object.} JSON object - */ - SystemTimestamps.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SystemTimestamps - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.SystemTimestamps - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SystemTimestamps.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.SystemTimestamps"; - }; - - return SystemTimestamps; - })(); - - v1.Schema = (function() { - - /** - * Properties of a Schema. - * @memberof google.cloud.datacatalog.v1 - * @interface ISchema - * @property {Array.|null} [columns] Schema columns - */ - - /** - * Constructs a new Schema. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a Schema. - * @implements ISchema - * @constructor - * @param {google.cloud.datacatalog.v1.ISchema=} [properties] Properties to set - */ - function Schema(properties) { - this.columns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Schema columns. - * @member {Array.} columns - * @memberof google.cloud.datacatalog.v1.Schema - * @instance - */ - Schema.prototype.columns = $util.emptyArray; - - /** - * Creates a new Schema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.Schema - * @static - * @param {google.cloud.datacatalog.v1.ISchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.Schema} Schema instance - */ - Schema.create = function create(properties) { - return new Schema(properties); - }; - - /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.datacatalog.v1.Schema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.Schema - * @static - * @param {google.cloud.datacatalog.v1.ISchema} message Schema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.cloud.datacatalog.v1.ColumnSchema.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Schema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.Schema - * @static - * @param {google.cloud.datacatalog.v1.ISchema} message Schema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Schema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.Schema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.Schema} Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.Schema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.datacatalog.v1.ColumnSchema.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Schema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.Schema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.Schema} Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Schema message. - * @function verify - * @memberof google.cloud.datacatalog.v1.Schema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Schema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.ColumnSchema.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - return null; - }; - - /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.Schema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.Schema} Schema - */ - Schema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.Schema) - return object; - var message = new $root.google.cloud.datacatalog.v1.Schema(); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.cloud.datacatalog.v1.Schema.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Schema.columns: object expected"); - message.columns[i] = $root.google.cloud.datacatalog.v1.ColumnSchema.fromObject(object.columns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.Schema - * @static - * @param {google.cloud.datacatalog.v1.Schema} message Schema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Schema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.cloud.datacatalog.v1.ColumnSchema.toObject(message.columns[j], options); - } - return object; - }; - - /** - * Converts this Schema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.Schema - * @instance - * @returns {Object.} JSON object - */ - Schema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Schema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.Schema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.Schema"; - }; - - return Schema; - })(); - - v1.ColumnSchema = (function() { - - /** - * Properties of a ColumnSchema. - * @memberof google.cloud.datacatalog.v1 - * @interface IColumnSchema - * @property {string|null} [column] ColumnSchema column - * @property {string|null} [type] ColumnSchema type - * @property {string|null} [description] ColumnSchema description - * @property {string|null} [mode] ColumnSchema mode - * @property {Array.|null} [subcolumns] ColumnSchema subcolumns - */ - - /** - * Constructs a new ColumnSchema. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ColumnSchema. - * @implements IColumnSchema - * @constructor - * @param {google.cloud.datacatalog.v1.IColumnSchema=} [properties] Properties to set - */ - function ColumnSchema(properties) { - this.subcolumns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ColumnSchema column. - * @member {string} column - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.column = ""; - - /** - * ColumnSchema type. - * @member {string} type - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.type = ""; - - /** - * ColumnSchema description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.description = ""; - - /** - * ColumnSchema mode. - * @member {string} mode - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.mode = ""; - - /** - * ColumnSchema subcolumns. - * @member {Array.} subcolumns - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.subcolumns = $util.emptyArray; - - /** - * Creates a new ColumnSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @static - * @param {google.cloud.datacatalog.v1.IColumnSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ColumnSchema} ColumnSchema instance - */ - ColumnSchema.create = function create(properties) { - return new ColumnSchema(properties); - }; - - /** - * Encodes the specified ColumnSchema message. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @static - * @param {google.cloud.datacatalog.v1.IColumnSchema} message ColumnSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnSchema.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mode); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.column); - if (message.subcolumns != null && message.subcolumns.length) - for (var i = 0; i < message.subcolumns.length; ++i) - $root.google.cloud.datacatalog.v1.ColumnSchema.encode(message.subcolumns[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ColumnSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ColumnSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @static - * @param {google.cloud.datacatalog.v1.IColumnSchema} message ColumnSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ColumnSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ColumnSchema} ColumnSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ColumnSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: { - message.column = reader.string(); - break; - } - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.mode = reader.string(); - break; - } - case 7: { - if (!(message.subcolumns && message.subcolumns.length)) - message.subcolumns = []; - message.subcolumns.push($root.google.cloud.datacatalog.v1.ColumnSchema.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ColumnSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ColumnSchema} ColumnSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ColumnSchema message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ColumnSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - if (!$util.isString(message.mode)) - return "mode: string expected"; - if (message.subcolumns != null && message.hasOwnProperty("subcolumns")) { - if (!Array.isArray(message.subcolumns)) - return "subcolumns: array expected"; - for (var i = 0; i < message.subcolumns.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.ColumnSchema.verify(message.subcolumns[i]); - if (error) - return "subcolumns." + error; - } - } - return null; - }; - - /** - * Creates a ColumnSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ColumnSchema} ColumnSchema - */ - ColumnSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ColumnSchema) - return object; - var message = new $root.google.cloud.datacatalog.v1.ColumnSchema(); - if (object.column != null) - message.column = String(object.column); - if (object.type != null) - message.type = String(object.type); - if (object.description != null) - message.description = String(object.description); - if (object.mode != null) - message.mode = String(object.mode); - if (object.subcolumns) { - if (!Array.isArray(object.subcolumns)) - throw TypeError(".google.cloud.datacatalog.v1.ColumnSchema.subcolumns: array expected"); - message.subcolumns = []; - for (var i = 0; i < object.subcolumns.length; ++i) { - if (typeof object.subcolumns[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ColumnSchema.subcolumns: object expected"); - message.subcolumns[i] = $root.google.cloud.datacatalog.v1.ColumnSchema.fromObject(object.subcolumns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ColumnSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @static - * @param {google.cloud.datacatalog.v1.ColumnSchema} message ColumnSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ColumnSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.subcolumns = []; - if (options.defaults) { - object.type = ""; - object.description = ""; - object.mode = ""; - object.column = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = message.mode; - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.subcolumns && message.subcolumns.length) { - object.subcolumns = []; - for (var j = 0; j < message.subcolumns.length; ++j) - object.subcolumns[j] = $root.google.cloud.datacatalog.v1.ColumnSchema.toObject(message.subcolumns[j], options); - } - return object; - }; - - /** - * Converts this ColumnSchema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @instance - * @returns {Object.} JSON object - */ - ColumnSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ColumnSchema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ColumnSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ColumnSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ColumnSchema"; - }; - - return ColumnSchema; - })(); - - v1.SearchCatalogResult = (function() { - - /** - * Properties of a SearchCatalogResult. - * @memberof google.cloud.datacatalog.v1 - * @interface ISearchCatalogResult - * @property {google.cloud.datacatalog.v1.SearchResultType|null} [searchResultType] SearchCatalogResult searchResultType - * @property {string|null} [searchResultSubtype] SearchCatalogResult searchResultSubtype - * @property {string|null} [relativeResourceName] SearchCatalogResult relativeResourceName - * @property {string|null} [linkedResource] SearchCatalogResult linkedResource - * @property {google.protobuf.ITimestamp|null} [modifyTime] SearchCatalogResult modifyTime - * @property {google.cloud.datacatalog.v1.IntegratedSystem|null} [integratedSystem] SearchCatalogResult integratedSystem - * @property {string|null} [userSpecifiedSystem] SearchCatalogResult userSpecifiedSystem - * @property {string|null} [fullyQualifiedName] SearchCatalogResult fullyQualifiedName - * @property {string|null} [displayName] SearchCatalogResult displayName - * @property {string|null} [description] SearchCatalogResult description - */ - - /** - * Constructs a new SearchCatalogResult. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a SearchCatalogResult. - * @implements ISearchCatalogResult - * @constructor - * @param {google.cloud.datacatalog.v1.ISearchCatalogResult=} [properties] Properties to set - */ - function SearchCatalogResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchCatalogResult searchResultType. - * @member {google.cloud.datacatalog.v1.SearchResultType} searchResultType - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.searchResultType = 0; - - /** - * SearchCatalogResult searchResultSubtype. - * @member {string} searchResultSubtype - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.searchResultSubtype = ""; - - /** - * SearchCatalogResult relativeResourceName. - * @member {string} relativeResourceName - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.relativeResourceName = ""; - - /** - * SearchCatalogResult linkedResource. - * @member {string} linkedResource - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.linkedResource = ""; - - /** - * SearchCatalogResult modifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} modifyTime - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.modifyTime = null; - - /** - * SearchCatalogResult integratedSystem. - * @member {google.cloud.datacatalog.v1.IntegratedSystem|null|undefined} integratedSystem - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.integratedSystem = null; - - /** - * SearchCatalogResult userSpecifiedSystem. - * @member {string|null|undefined} userSpecifiedSystem - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.userSpecifiedSystem = null; - - /** - * SearchCatalogResult fullyQualifiedName. - * @member {string} fullyQualifiedName - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.fullyQualifiedName = ""; - - /** - * SearchCatalogResult displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.displayName = ""; - - /** - * SearchCatalogResult description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.description = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SearchCatalogResult system. - * @member {"integratedSystem"|"userSpecifiedSystem"|undefined} system - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - */ - Object.defineProperty(SearchCatalogResult.prototype, "system", { - get: $util.oneOfGetter($oneOfFields = ["integratedSystem", "userSpecifiedSystem"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SearchCatalogResult instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @static - * @param {google.cloud.datacatalog.v1.ISearchCatalogResult=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.SearchCatalogResult} SearchCatalogResult instance - */ - SearchCatalogResult.create = function create(properties) { - return new SearchCatalogResult(properties); - }; - - /** - * Encodes the specified SearchCatalogResult message. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @static - * @param {google.cloud.datacatalog.v1.ISearchCatalogResult} message SearchCatalogResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.searchResultType != null && Object.hasOwnProperty.call(message, "searchResultType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.searchResultType); - if (message.searchResultSubtype != null && Object.hasOwnProperty.call(message, "searchResultSubtype")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.searchResultSubtype); - if (message.relativeResourceName != null && Object.hasOwnProperty.call(message, "relativeResourceName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relativeResourceName); - if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.linkedResource); - if (message.modifyTime != null && Object.hasOwnProperty.call(message, "modifyTime")) - $root.google.protobuf.Timestamp.encode(message.modifyTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.integratedSystem != null && Object.hasOwnProperty.call(message, "integratedSystem")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.integratedSystem); - if (message.userSpecifiedSystem != null && Object.hasOwnProperty.call(message, "userSpecifiedSystem")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.userSpecifiedSystem); - if (message.fullyQualifiedName != null && Object.hasOwnProperty.call(message, "fullyQualifiedName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.fullyQualifiedName); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.description); - return writer; - }; - - /** - * Encodes the specified SearchCatalogResult message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SearchCatalogResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @static - * @param {google.cloud.datacatalog.v1.ISearchCatalogResult} message SearchCatalogResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchCatalogResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.SearchCatalogResult} SearchCatalogResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.SearchCatalogResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.searchResultType = reader.int32(); - break; - } - case 2: { - message.searchResultSubtype = reader.string(); - break; - } - case 3: { - message.relativeResourceName = reader.string(); - break; - } - case 4: { - message.linkedResource = reader.string(); - break; - } - case 7: { - message.modifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.integratedSystem = reader.int32(); - break; - } - case 9: { - message.userSpecifiedSystem = reader.string(); - break; - } - case 10: { - message.fullyQualifiedName = reader.string(); - break; - } - case 12: { - message.displayName = reader.string(); - break; - } - case 13: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchCatalogResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.SearchCatalogResult} SearchCatalogResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchCatalogResult message. - * @function verify - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchCatalogResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) - switch (message.searchResultType) { - default: - return "searchResultType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) - if (!$util.isString(message.searchResultSubtype)) - return "searchResultSubtype: string expected"; - if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) - if (!$util.isString(message.relativeResourceName)) - return "relativeResourceName: string expected"; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; - if (message.modifyTime != null && message.hasOwnProperty("modifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.modifyTime); - if (error) - return "modifyTime." + error; - } - if (message.integratedSystem != null && message.hasOwnProperty("integratedSystem")) { - properties.system = 1; - switch (message.integratedSystem) { - default: - return "integratedSystem: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.userSpecifiedSystem != null && message.hasOwnProperty("userSpecifiedSystem")) { - if (properties.system === 1) - return "system: multiple values"; - properties.system = 1; - if (!$util.isString(message.userSpecifiedSystem)) - return "userSpecifiedSystem: string expected"; - } - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) - if (!$util.isString(message.fullyQualifiedName)) - return "fullyQualifiedName: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a SearchCatalogResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.SearchCatalogResult} SearchCatalogResult - */ - SearchCatalogResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.SearchCatalogResult) - return object; - var message = new $root.google.cloud.datacatalog.v1.SearchCatalogResult(); - switch (object.searchResultType) { - default: - if (typeof object.searchResultType === "number") { - message.searchResultType = object.searchResultType; - break; - } - break; - case "SEARCH_RESULT_TYPE_UNSPECIFIED": - case 0: - message.searchResultType = 0; - break; - case "ENTRY": - case 1: - message.searchResultType = 1; - break; - case "TAG_TEMPLATE": - case 2: - message.searchResultType = 2; - break; - case "ENTRY_GROUP": - case 3: - message.searchResultType = 3; - break; - } - if (object.searchResultSubtype != null) - message.searchResultSubtype = String(object.searchResultSubtype); - if (object.relativeResourceName != null) - message.relativeResourceName = String(object.relativeResourceName); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - if (object.modifyTime != null) { - if (typeof object.modifyTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1.SearchCatalogResult.modifyTime: object expected"); - message.modifyTime = $root.google.protobuf.Timestamp.fromObject(object.modifyTime); - } - switch (object.integratedSystem) { - default: - if (typeof object.integratedSystem === "number") { - message.integratedSystem = object.integratedSystem; - break; - } - break; - case "INTEGRATED_SYSTEM_UNSPECIFIED": - case 0: - message.integratedSystem = 0; - break; - case "BIGQUERY": - case 1: - message.integratedSystem = 1; - break; - case "CLOUD_PUBSUB": - case 2: - message.integratedSystem = 2; - break; - case "DATAPROC_METASTORE": - case 3: - message.integratedSystem = 3; - break; - case "DATAPLEX": - case 4: - message.integratedSystem = 4; - break; - } - if (object.userSpecifiedSystem != null) - message.userSpecifiedSystem = String(object.userSpecifiedSystem); - if (object.fullyQualifiedName != null) - message.fullyQualifiedName = String(object.fullyQualifiedName); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a SearchCatalogResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @static - * @param {google.cloud.datacatalog.v1.SearchCatalogResult} message SearchCatalogResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchCatalogResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.searchResultType = options.enums === String ? "SEARCH_RESULT_TYPE_UNSPECIFIED" : 0; - object.searchResultSubtype = ""; - object.relativeResourceName = ""; - object.linkedResource = ""; - object.modifyTime = null; - object.fullyQualifiedName = ""; - object.displayName = ""; - object.description = ""; - } - if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) - object.searchResultType = options.enums === String ? $root.google.cloud.datacatalog.v1.SearchResultType[message.searchResultType] === undefined ? message.searchResultType : $root.google.cloud.datacatalog.v1.SearchResultType[message.searchResultType] : message.searchResultType; - if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) - object.searchResultSubtype = message.searchResultSubtype; - if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) - object.relativeResourceName = message.relativeResourceName; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - object.linkedResource = message.linkedResource; - if (message.modifyTime != null && message.hasOwnProperty("modifyTime")) - object.modifyTime = $root.google.protobuf.Timestamp.toObject(message.modifyTime, options); - if (message.integratedSystem != null && message.hasOwnProperty("integratedSystem")) { - object.integratedSystem = options.enums === String ? $root.google.cloud.datacatalog.v1.IntegratedSystem[message.integratedSystem] === undefined ? message.integratedSystem : $root.google.cloud.datacatalog.v1.IntegratedSystem[message.integratedSystem] : message.integratedSystem; - if (options.oneofs) - object.system = "integratedSystem"; - } - if (message.userSpecifiedSystem != null && message.hasOwnProperty("userSpecifiedSystem")) { - object.userSpecifiedSystem = message.userSpecifiedSystem; - if (options.oneofs) - object.system = "userSpecifiedSystem"; - } - if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) - object.fullyQualifiedName = message.fullyQualifiedName; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this SearchCatalogResult to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @instance - * @returns {Object.} JSON object - */ - SearchCatalogResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchCatalogResult - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.SearchCatalogResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchCatalogResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.SearchCatalogResult"; - }; - - return SearchCatalogResult; - })(); - - /** - * SearchResultType enum. - * @name google.cloud.datacatalog.v1.SearchResultType - * @enum {number} - * @property {number} SEARCH_RESULT_TYPE_UNSPECIFIED=0 SEARCH_RESULT_TYPE_UNSPECIFIED value - * @property {number} ENTRY=1 ENTRY value - * @property {number} TAG_TEMPLATE=2 TAG_TEMPLATE value - * @property {number} ENTRY_GROUP=3 ENTRY_GROUP value - */ - v1.SearchResultType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEARCH_RESULT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENTRY"] = 1; - values[valuesById[2] = "TAG_TEMPLATE"] = 2; - values[valuesById[3] = "ENTRY_GROUP"] = 3; - return values; - })(); - - v1.BigQueryTableSpec = (function() { - - /** - * Properties of a BigQueryTableSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IBigQueryTableSpec - * @property {google.cloud.datacatalog.v1.TableSourceType|null} [tableSourceType] BigQueryTableSpec tableSourceType - * @property {google.cloud.datacatalog.v1.IViewSpec|null} [viewSpec] BigQueryTableSpec viewSpec - * @property {google.cloud.datacatalog.v1.ITableSpec|null} [tableSpec] BigQueryTableSpec tableSpec - */ - - /** - * Constructs a new BigQueryTableSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a BigQueryTableSpec. - * @implements IBigQueryTableSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IBigQueryTableSpec=} [properties] Properties to set - */ - function BigQueryTableSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryTableSpec tableSourceType. - * @member {google.cloud.datacatalog.v1.TableSourceType} tableSourceType - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @instance - */ - BigQueryTableSpec.prototype.tableSourceType = 0; - - /** - * BigQueryTableSpec viewSpec. - * @member {google.cloud.datacatalog.v1.IViewSpec|null|undefined} viewSpec - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @instance - */ - BigQueryTableSpec.prototype.viewSpec = null; - - /** - * BigQueryTableSpec tableSpec. - * @member {google.cloud.datacatalog.v1.ITableSpec|null|undefined} tableSpec - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @instance - */ - BigQueryTableSpec.prototype.tableSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BigQueryTableSpec typeSpec. - * @member {"viewSpec"|"tableSpec"|undefined} typeSpec - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @instance - */ - Object.defineProperty(BigQueryTableSpec.prototype, "typeSpec", { - get: $util.oneOfGetter($oneOfFields = ["viewSpec", "tableSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BigQueryTableSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryTableSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.BigQueryTableSpec} BigQueryTableSpec instance - */ - BigQueryTableSpec.create = function create(properties) { - return new BigQueryTableSpec(properties); - }; - - /** - * Encodes the specified BigQueryTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryTableSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryTableSpec} message BigQueryTableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryTableSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tableSourceType != null && Object.hasOwnProperty.call(message, "tableSourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tableSourceType); - if (message.viewSpec != null && Object.hasOwnProperty.call(message, "viewSpec")) - $root.google.cloud.datacatalog.v1.ViewSpec.encode(message.viewSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tableSpec != null && Object.hasOwnProperty.call(message, "tableSpec")) - $root.google.cloud.datacatalog.v1.TableSpec.encode(message.tableSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BigQueryTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryTableSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryTableSpec} message BigQueryTableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryTableSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.BigQueryTableSpec} BigQueryTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryTableSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.BigQueryTableSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tableSourceType = reader.int32(); - break; - } - case 2: { - message.viewSpec = $root.google.cloud.datacatalog.v1.ViewSpec.decode(reader, reader.uint32()); - break; - } - case 3: { - message.tableSpec = $root.google.cloud.datacatalog.v1.TableSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.BigQueryTableSpec} BigQueryTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryTableSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryTableSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryTableSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) - switch (message.tableSourceType) { - default: - return "tableSourceType: enum value expected"; - case 0: - case 2: - case 5: - case 7: - break; - } - if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) { - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.ViewSpec.verify(message.viewSpec); - if (error) - return "viewSpec." + error; - } - } - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { - if (properties.typeSpec === 1) - return "typeSpec: multiple values"; - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1.TableSpec.verify(message.tableSpec); - if (error) - return "tableSpec." + error; - } - } - return null; - }; - - /** - * Creates a BigQueryTableSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.BigQueryTableSpec} BigQueryTableSpec - */ - BigQueryTableSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.BigQueryTableSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.BigQueryTableSpec(); - switch (object.tableSourceType) { - default: - if (typeof object.tableSourceType === "number") { - message.tableSourceType = object.tableSourceType; - break; - } - break; - case "TABLE_SOURCE_TYPE_UNSPECIFIED": - case 0: - message.tableSourceType = 0; - break; - case "BIGQUERY_VIEW": - case 2: - message.tableSourceType = 2; - break; - case "BIGQUERY_TABLE": - case 5: - message.tableSourceType = 5; - break; - case "BIGQUERY_MATERIALIZED_VIEW": - case 7: - message.tableSourceType = 7; - break; - } - if (object.viewSpec != null) { - if (typeof object.viewSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.BigQueryTableSpec.viewSpec: object expected"); - message.viewSpec = $root.google.cloud.datacatalog.v1.ViewSpec.fromObject(object.viewSpec); - } - if (object.tableSpec != null) { - if (typeof object.tableSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1.BigQueryTableSpec.tableSpec: object expected"); - message.tableSpec = $root.google.cloud.datacatalog.v1.TableSpec.fromObject(object.tableSpec); - } - return message; - }; - - /** - * Creates a plain object from a BigQueryTableSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @static - * @param {google.cloud.datacatalog.v1.BigQueryTableSpec} message BigQueryTableSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryTableSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tableSourceType = options.enums === String ? "TABLE_SOURCE_TYPE_UNSPECIFIED" : 0; - if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) - object.tableSourceType = options.enums === String ? $root.google.cloud.datacatalog.v1.TableSourceType[message.tableSourceType] === undefined ? message.tableSourceType : $root.google.cloud.datacatalog.v1.TableSourceType[message.tableSourceType] : message.tableSourceType; - if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) { - object.viewSpec = $root.google.cloud.datacatalog.v1.ViewSpec.toObject(message.viewSpec, options); - if (options.oneofs) - object.typeSpec = "viewSpec"; - } - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { - object.tableSpec = $root.google.cloud.datacatalog.v1.TableSpec.toObject(message.tableSpec, options); - if (options.oneofs) - object.typeSpec = "tableSpec"; - } - return object; - }; - - /** - * Converts this BigQueryTableSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @instance - * @returns {Object.} JSON object - */ - BigQueryTableSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryTableSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.BigQueryTableSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryTableSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.BigQueryTableSpec"; - }; - - return BigQueryTableSpec; - })(); - - /** - * TableSourceType enum. - * @name google.cloud.datacatalog.v1.TableSourceType - * @enum {number} - * @property {number} TABLE_SOURCE_TYPE_UNSPECIFIED=0 TABLE_SOURCE_TYPE_UNSPECIFIED value - * @property {number} BIGQUERY_VIEW=2 BIGQUERY_VIEW value - * @property {number} BIGQUERY_TABLE=5 BIGQUERY_TABLE value - * @property {number} BIGQUERY_MATERIALIZED_VIEW=7 BIGQUERY_MATERIALIZED_VIEW value - */ - v1.TableSourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TABLE_SOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "BIGQUERY_VIEW"] = 2; - values[valuesById[5] = "BIGQUERY_TABLE"] = 5; - values[valuesById[7] = "BIGQUERY_MATERIALIZED_VIEW"] = 7; - return values; - })(); - - v1.ViewSpec = (function() { - - /** - * Properties of a ViewSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IViewSpec - * @property {string|null} [viewQuery] ViewSpec viewQuery - */ - - /** - * Constructs a new ViewSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ViewSpec. - * @implements IViewSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IViewSpec=} [properties] Properties to set - */ - function ViewSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ViewSpec viewQuery. - * @member {string} viewQuery - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @instance - */ - ViewSpec.prototype.viewQuery = ""; - - /** - * Creates a new ViewSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @static - * @param {google.cloud.datacatalog.v1.IViewSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ViewSpec} ViewSpec instance - */ - ViewSpec.create = function create(properties) { - return new ViewSpec(properties); - }; - - /** - * Encodes the specified ViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.ViewSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @static - * @param {google.cloud.datacatalog.v1.IViewSpec} message ViewSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ViewSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.viewQuery != null && Object.hasOwnProperty.call(message, "viewQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.viewQuery); - return writer; - }; - - /** - * Encodes the specified ViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ViewSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @static - * @param {google.cloud.datacatalog.v1.IViewSpec} message ViewSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ViewSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ViewSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ViewSpec} ViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ViewSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ViewSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.viewQuery = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ViewSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ViewSpec} ViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ViewSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ViewSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ViewSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) - if (!$util.isString(message.viewQuery)) - return "viewQuery: string expected"; - return null; - }; - - /** - * Creates a ViewSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ViewSpec} ViewSpec - */ - ViewSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ViewSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.ViewSpec(); - if (object.viewQuery != null) - message.viewQuery = String(object.viewQuery); - return message; - }; - - /** - * Creates a plain object from a ViewSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @static - * @param {google.cloud.datacatalog.v1.ViewSpec} message ViewSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ViewSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.viewQuery = ""; - if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) - object.viewQuery = message.viewQuery; - return object; - }; - - /** - * Converts this ViewSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @instance - * @returns {Object.} JSON object - */ - ViewSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ViewSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ViewSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ViewSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ViewSpec"; - }; - - return ViewSpec; - })(); - - v1.TableSpec = (function() { - - /** - * Properties of a TableSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface ITableSpec - * @property {string|null} [groupedEntry] TableSpec groupedEntry - */ - - /** - * Constructs a new TableSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a TableSpec. - * @implements ITableSpec - * @constructor - * @param {google.cloud.datacatalog.v1.ITableSpec=} [properties] Properties to set - */ - function TableSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TableSpec groupedEntry. - * @member {string} groupedEntry - * @memberof google.cloud.datacatalog.v1.TableSpec - * @instance - */ - TableSpec.prototype.groupedEntry = ""; - - /** - * Creates a new TableSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.TableSpec - * @static - * @param {google.cloud.datacatalog.v1.ITableSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.TableSpec} TableSpec instance - */ - TableSpec.create = function create(properties) { - return new TableSpec(properties); - }; - - /** - * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.TableSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.TableSpec - * @static - * @param {google.cloud.datacatalog.v1.ITableSpec} message TableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.groupedEntry != null && Object.hasOwnProperty.call(message, "groupedEntry")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupedEntry); - return writer; - }; - - /** - * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TableSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.TableSpec - * @static - * @param {google.cloud.datacatalog.v1.ITableSpec} message TableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TableSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.TableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.TableSpec} TableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.TableSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.groupedEntry = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TableSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.TableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.TableSpec} TableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TableSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.TableSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TableSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) - if (!$util.isString(message.groupedEntry)) - return "groupedEntry: string expected"; - return null; - }; - - /** - * Creates a TableSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.TableSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.TableSpec} TableSpec - */ - TableSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.TableSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.TableSpec(); - if (object.groupedEntry != null) - message.groupedEntry = String(object.groupedEntry); - return message; - }; - - /** - * Creates a plain object from a TableSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.TableSpec - * @static - * @param {google.cloud.datacatalog.v1.TableSpec} message TableSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TableSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.groupedEntry = ""; - if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) - object.groupedEntry = message.groupedEntry; - return object; - }; - - /** - * Converts this TableSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.TableSpec - * @instance - * @returns {Object.} JSON object - */ - TableSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TableSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.TableSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TableSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.TableSpec"; - }; - - return TableSpec; - })(); - - v1.BigQueryDateShardedSpec = (function() { - - /** - * Properties of a BigQueryDateShardedSpec. - * @memberof google.cloud.datacatalog.v1 - * @interface IBigQueryDateShardedSpec - * @property {string|null} [dataset] BigQueryDateShardedSpec dataset - * @property {string|null} [tablePrefix] BigQueryDateShardedSpec tablePrefix - * @property {number|Long|null} [shardCount] BigQueryDateShardedSpec shardCount - * @property {string|null} [latestShardResource] BigQueryDateShardedSpec latestShardResource - */ - - /** - * Constructs a new BigQueryDateShardedSpec. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a BigQueryDateShardedSpec. - * @implements IBigQueryDateShardedSpec - * @constructor - * @param {google.cloud.datacatalog.v1.IBigQueryDateShardedSpec=} [properties] Properties to set - */ - function BigQueryDateShardedSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryDateShardedSpec dataset. - * @member {string} dataset - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @instance - */ - BigQueryDateShardedSpec.prototype.dataset = ""; - - /** - * BigQueryDateShardedSpec tablePrefix. - * @member {string} tablePrefix - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @instance - */ - BigQueryDateShardedSpec.prototype.tablePrefix = ""; - - /** - * BigQueryDateShardedSpec shardCount. - * @member {number|Long} shardCount - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @instance - */ - BigQueryDateShardedSpec.prototype.shardCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BigQueryDateShardedSpec latestShardResource. - * @member {string} latestShardResource - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @instance - */ - BigQueryDateShardedSpec.prototype.latestShardResource = ""; - - /** - * Creates a new BigQueryDateShardedSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryDateShardedSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.BigQueryDateShardedSpec} BigQueryDateShardedSpec instance - */ - BigQueryDateShardedSpec.create = function create(properties) { - return new BigQueryDateShardedSpec(properties); - }; - - /** - * Encodes the specified BigQueryDateShardedSpec message. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryDateShardedSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryDateShardedSpec} message BigQueryDateShardedSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDateShardedSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); - if (message.tablePrefix != null && Object.hasOwnProperty.call(message, "tablePrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tablePrefix); - if (message.shardCount != null && Object.hasOwnProperty.call(message, "shardCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.shardCount); - if (message.latestShardResource != null && Object.hasOwnProperty.call(message, "latestShardResource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.latestShardResource); - return writer; - }; - - /** - * Encodes the specified BigQueryDateShardedSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.BigQueryDateShardedSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @static - * @param {google.cloud.datacatalog.v1.IBigQueryDateShardedSpec} message BigQueryDateShardedSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDateShardedSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.BigQueryDateShardedSpec} BigQueryDateShardedSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDateShardedSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.BigQueryDateShardedSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataset = reader.string(); - break; - } - case 2: { - message.tablePrefix = reader.string(); - break; - } - case 3: { - message.shardCount = reader.int64(); - break; - } - case 4: { - message.latestShardResource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.BigQueryDateShardedSpec} BigQueryDateShardedSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDateShardedSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryDateShardedSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryDateShardedSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataset != null && message.hasOwnProperty("dataset")) - if (!$util.isString(message.dataset)) - return "dataset: string expected"; - if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) - if (!$util.isString(message.tablePrefix)) - return "tablePrefix: string expected"; - if (message.shardCount != null && message.hasOwnProperty("shardCount")) - if (!$util.isInteger(message.shardCount) && !(message.shardCount && $util.isInteger(message.shardCount.low) && $util.isInteger(message.shardCount.high))) - return "shardCount: integer|Long expected"; - if (message.latestShardResource != null && message.hasOwnProperty("latestShardResource")) - if (!$util.isString(message.latestShardResource)) - return "latestShardResource: string expected"; - return null; - }; - - /** - * Creates a BigQueryDateShardedSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.BigQueryDateShardedSpec} BigQueryDateShardedSpec - */ - BigQueryDateShardedSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.BigQueryDateShardedSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1.BigQueryDateShardedSpec(); - if (object.dataset != null) - message.dataset = String(object.dataset); - if (object.tablePrefix != null) - message.tablePrefix = String(object.tablePrefix); - if (object.shardCount != null) - if ($util.Long) - (message.shardCount = $util.Long.fromValue(object.shardCount)).unsigned = false; - else if (typeof object.shardCount === "string") - message.shardCount = parseInt(object.shardCount, 10); - else if (typeof object.shardCount === "number") - message.shardCount = object.shardCount; - else if (typeof object.shardCount === "object") - message.shardCount = new $util.LongBits(object.shardCount.low >>> 0, object.shardCount.high >>> 0).toNumber(); - if (object.latestShardResource != null) - message.latestShardResource = String(object.latestShardResource); - return message; - }; - - /** - * Creates a plain object from a BigQueryDateShardedSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @static - * @param {google.cloud.datacatalog.v1.BigQueryDateShardedSpec} message BigQueryDateShardedSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryDateShardedSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataset = ""; - object.tablePrefix = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.shardCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.shardCount = options.longs === String ? "0" : 0; - object.latestShardResource = ""; - } - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = message.dataset; - if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) - object.tablePrefix = message.tablePrefix; - if (message.shardCount != null && message.hasOwnProperty("shardCount")) - if (typeof message.shardCount === "number") - object.shardCount = options.longs === String ? String(message.shardCount) : message.shardCount; - else - object.shardCount = options.longs === String ? $util.Long.prototype.toString.call(message.shardCount) : options.longs === Number ? new $util.LongBits(message.shardCount.low >>> 0, message.shardCount.high >>> 0).toNumber() : message.shardCount; - if (message.latestShardResource != null && message.hasOwnProperty("latestShardResource")) - object.latestShardResource = message.latestShardResource; - return object; - }; - - /** - * Converts this BigQueryDateShardedSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @instance - * @returns {Object.} JSON object - */ - BigQueryDateShardedSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryDateShardedSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.BigQueryDateShardedSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryDateShardedSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.BigQueryDateShardedSpec"; - }; - - return BigQueryDateShardedSpec; - })(); - - v1.Tag = (function() { - - /** - * Properties of a Tag. - * @memberof google.cloud.datacatalog.v1 - * @interface ITag - * @property {string|null} [name] Tag name - * @property {string|null} [template] Tag template - * @property {string|null} [templateDisplayName] Tag templateDisplayName - * @property {string|null} [column] Tag column - * @property {Object.|null} [fields] Tag fields - */ - - /** - * Constructs a new Tag. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a Tag. - * @implements ITag - * @constructor - * @param {google.cloud.datacatalog.v1.ITag=} [properties] Properties to set - */ - function Tag(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tag name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.Tag - * @instance - */ - Tag.prototype.name = ""; - - /** - * Tag template. - * @member {string} template - * @memberof google.cloud.datacatalog.v1.Tag - * @instance - */ - Tag.prototype.template = ""; - - /** - * Tag templateDisplayName. - * @member {string} templateDisplayName - * @memberof google.cloud.datacatalog.v1.Tag - * @instance - */ - Tag.prototype.templateDisplayName = ""; - - /** - * Tag column. - * @member {string|null|undefined} column - * @memberof google.cloud.datacatalog.v1.Tag - * @instance - */ - Tag.prototype.column = null; - - /** - * Tag fields. - * @member {Object.} fields - * @memberof google.cloud.datacatalog.v1.Tag - * @instance - */ - Tag.prototype.fields = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Tag scope. - * @member {"column"|undefined} scope - * @memberof google.cloud.datacatalog.v1.Tag - * @instance - */ - Object.defineProperty(Tag.prototype, "scope", { - get: $util.oneOfGetter($oneOfFields = ["column"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Tag instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.Tag - * @static - * @param {google.cloud.datacatalog.v1.ITag=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.Tag} Tag instance - */ - Tag.create = function create(properties) { - return new Tag(properties); - }; - - /** - * Encodes the specified Tag message. Does not implicitly {@link google.cloud.datacatalog.v1.Tag.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.Tag - * @static - * @param {google.cloud.datacatalog.v1.ITag} message Tag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tag.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.template != null && Object.hasOwnProperty.call(message, "template")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.template); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.datacatalog.v1.TagField.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.column); - if (message.templateDisplayName != null && Object.hasOwnProperty.call(message, "templateDisplayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.templateDisplayName); - return writer; - }; - - /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Tag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.Tag - * @static - * @param {google.cloud.datacatalog.v1.ITag} message Tag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Tag message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.Tag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.Tag} Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tag.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.Tag(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.template = reader.string(); - break; - } - case 5: { - message.templateDisplayName = reader.string(); - break; - } - case 4: { - message.column = reader.string(); - break; - } - case 3: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.datacatalog.v1.TagField.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Tag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.Tag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.Tag} Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tag message. - * @function verify - * @memberof google.cloud.datacatalog.v1.Tag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tag.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.template != null && message.hasOwnProperty("template")) - if (!$util.isString(message.template)) - return "template: string expected"; - if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) - if (!$util.isString(message.templateDisplayName)) - return "templateDisplayName: string expected"; - if (message.column != null && message.hasOwnProperty("column")) { - properties.scope = 1; - if (!$util.isString(message.column)) - return "column: string expected"; - } - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.TagField.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.Tag - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.Tag} Tag - */ - Tag.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.Tag) - return object; - var message = new $root.google.cloud.datacatalog.v1.Tag(); - if (object.name != null) - message.name = String(object.name); - if (object.template != null) - message.template = String(object.template); - if (object.templateDisplayName != null) - message.templateDisplayName = String(object.templateDisplayName); - if (object.column != null) - message.column = String(object.column); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Tag.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Tag.fields: object expected"); - message.fields[keys[i]] = $root.google.cloud.datacatalog.v1.TagField.fromObject(object.fields[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.Tag - * @static - * @param {google.cloud.datacatalog.v1.Tag} message Tag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - if (options.defaults) { - object.name = ""; - object.template = ""; - object.templateDisplayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.template != null && message.hasOwnProperty("template")) - object.template = message.template; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.cloud.datacatalog.v1.TagField.toObject(message.fields[keys2[j]], options); - } - if (message.column != null && message.hasOwnProperty("column")) { - object.column = message.column; - if (options.oneofs) - object.scope = "column"; - } - if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) - object.templateDisplayName = message.templateDisplayName; - return object; - }; - - /** - * Converts this Tag to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.Tag - * @instance - * @returns {Object.} JSON object - */ - Tag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Tag - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.Tag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Tag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.Tag"; - }; - - return Tag; - })(); - - v1.TagField = (function() { - - /** - * Properties of a TagField. - * @memberof google.cloud.datacatalog.v1 - * @interface ITagField - * @property {string|null} [displayName] TagField displayName - * @property {number|null} [doubleValue] TagField doubleValue - * @property {string|null} [stringValue] TagField stringValue - * @property {boolean|null} [boolValue] TagField boolValue - * @property {google.protobuf.ITimestamp|null} [timestampValue] TagField timestampValue - * @property {google.cloud.datacatalog.v1.TagField.IEnumValue|null} [enumValue] TagField enumValue - * @property {string|null} [richtextValue] TagField richtextValue - * @property {number|null} [order] TagField order - */ - - /** - * Constructs a new TagField. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a TagField. - * @implements ITagField - * @constructor - * @param {google.cloud.datacatalog.v1.ITagField=} [properties] Properties to set - */ - function TagField(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TagField displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - */ - TagField.prototype.displayName = ""; - - /** - * TagField doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - */ - TagField.prototype.doubleValue = null; - - /** - * TagField stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - */ - TagField.prototype.stringValue = null; - - /** - * TagField boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - */ - TagField.prototype.boolValue = null; - - /** - * TagField timestampValue. - * @member {google.protobuf.ITimestamp|null|undefined} timestampValue - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - */ - TagField.prototype.timestampValue = null; - - /** - * TagField enumValue. - * @member {google.cloud.datacatalog.v1.TagField.IEnumValue|null|undefined} enumValue - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - */ - TagField.prototype.enumValue = null; - - /** - * TagField richtextValue. - * @member {string|null|undefined} richtextValue - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - */ - TagField.prototype.richtextValue = null; - - /** - * TagField order. - * @member {number} order - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - */ - TagField.prototype.order = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TagField kind. - * @member {"doubleValue"|"stringValue"|"boolValue"|"timestampValue"|"enumValue"|"richtextValue"|undefined} kind - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - */ - Object.defineProperty(TagField.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["doubleValue", "stringValue", "boolValue", "timestampValue", "enumValue", "richtextValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TagField instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.TagField - * @static - * @param {google.cloud.datacatalog.v1.ITagField=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.TagField} TagField instance - */ - TagField.create = function create(properties) { - return new TagField(properties); - }; - - /** - * Encodes the specified TagField message. Does not implicitly {@link google.cloud.datacatalog.v1.TagField.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.TagField - * @static - * @param {google.cloud.datacatalog.v1.ITagField} message TagField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagField.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.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) - $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.enumValue != null && Object.hasOwnProperty.call(message, "enumValue")) - $root.google.cloud.datacatalog.v1.TagField.EnumValue.encode(message.enumValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.order != null && Object.hasOwnProperty.call(message, "order")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.order); - if (message.richtextValue != null && Object.hasOwnProperty.call(message, "richtextValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.richtextValue); - return writer; - }; - - /** - * Encodes the specified TagField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TagField.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.TagField - * @static - * @param {google.cloud.datacatalog.v1.ITagField} message TagField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TagField message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.TagField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.TagField} TagField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagField.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.TagField(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.doubleValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.enumValue = $root.google.cloud.datacatalog.v1.TagField.EnumValue.decode(reader, reader.uint32()); - break; - } - case 8: { - message.richtextValue = reader.string(); - break; - } - case 7: { - message.order = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TagField message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.TagField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.TagField} TagField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagField.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TagField message. - * @function verify - * @memberof google.cloud.datacatalog.v1.TagField - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TagField.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - properties.kind = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.timestampValue); - if (error) - return "timestampValue." + error; - } - } - if (message.enumValue != null && message.hasOwnProperty("enumValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.datacatalog.v1.TagField.EnumValue.verify(message.enumValue); - if (error) - return "enumValue." + error; - } - } - if (message.richtextValue != null && message.hasOwnProperty("richtextValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.richtextValue)) - return "richtextValue: string expected"; - } - if (message.order != null && message.hasOwnProperty("order")) - if (!$util.isInteger(message.order)) - return "order: integer expected"; - return null; - }; - - /** - * Creates a TagField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.TagField - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.TagField} TagField - */ - TagField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.TagField) - return object; - var message = new $root.google.cloud.datacatalog.v1.TagField(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.timestampValue != null) { - if (typeof object.timestampValue !== "object") - throw TypeError(".google.cloud.datacatalog.v1.TagField.timestampValue: object expected"); - message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); - } - if (object.enumValue != null) { - if (typeof object.enumValue !== "object") - throw TypeError(".google.cloud.datacatalog.v1.TagField.enumValue: object expected"); - message.enumValue = $root.google.cloud.datacatalog.v1.TagField.EnumValue.fromObject(object.enumValue); - } - if (object.richtextValue != null) - message.richtextValue = String(object.richtextValue); - if (object.order != null) - message.order = object.order | 0; - return message; - }; - - /** - * Creates a plain object from a TagField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.TagField - * @static - * @param {google.cloud.datacatalog.v1.TagField} message TagField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TagField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.order = 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.kind = "doubleValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); - if (options.oneofs) - object.kind = "timestampValue"; - } - if (message.enumValue != null && message.hasOwnProperty("enumValue")) { - object.enumValue = $root.google.cloud.datacatalog.v1.TagField.EnumValue.toObject(message.enumValue, options); - if (options.oneofs) - object.kind = "enumValue"; - } - if (message.order != null && message.hasOwnProperty("order")) - object.order = message.order; - if (message.richtextValue != null && message.hasOwnProperty("richtextValue")) { - object.richtextValue = message.richtextValue; - if (options.oneofs) - object.kind = "richtextValue"; - } - return object; - }; - - /** - * Converts this TagField to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.TagField - * @instance - * @returns {Object.} JSON object - */ - TagField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TagField - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.TagField - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TagField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.TagField"; - }; - - TagField.EnumValue = (function() { - - /** - * Properties of an EnumValue. - * @memberof google.cloud.datacatalog.v1.TagField - * @interface IEnumValue - * @property {string|null} [displayName] EnumValue displayName - */ - - /** - * Constructs a new EnumValue. - * @memberof google.cloud.datacatalog.v1.TagField - * @classdesc Represents an EnumValue. - * @implements IEnumValue - * @constructor - * @param {google.cloud.datacatalog.v1.TagField.IEnumValue=} [properties] Properties to set - */ - function EnumValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValue displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @instance - */ - EnumValue.prototype.displayName = ""; - - /** - * Creates a new EnumValue instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1.TagField.IEnumValue=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.TagField.EnumValue} EnumValue instance - */ - EnumValue.create = function create(properties) { - return new EnumValue(properties); - }; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1.TagField.EnumValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1.TagField.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.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); - return writer; - }; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TagField.EnumValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1.TagField.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.TagField.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.TagField.EnumValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.TagField.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValue message. - * @function verify - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValue.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"; - return null; - }; - - /** - * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.TagField.EnumValue} EnumValue - */ - EnumValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.TagField.EnumValue) - return object; - var message = new $root.google.cloud.datacatalog.v1.TagField.EnumValue(); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1.TagField.EnumValue} message EnumValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.displayName = ""; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this EnumValue to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @instance - * @returns {Object.} JSON object - */ - EnumValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValue - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.TagField.EnumValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.TagField.EnumValue"; - }; - - return EnumValue; - })(); - - return TagField; - })(); - - v1.TagTemplate = (function() { - - /** - * Properties of a TagTemplate. - * @memberof google.cloud.datacatalog.v1 - * @interface ITagTemplate - * @property {string|null} [name] TagTemplate name - * @property {string|null} [displayName] TagTemplate displayName - * @property {boolean|null} [isPubliclyReadable] TagTemplate isPubliclyReadable - * @property {Object.|null} [fields] TagTemplate fields - */ - - /** - * Constructs a new TagTemplate. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a TagTemplate. - * @implements ITagTemplate - * @constructor - * @param {google.cloud.datacatalog.v1.ITagTemplate=} [properties] Properties to set - */ - function TagTemplate(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TagTemplate name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @instance - */ - TagTemplate.prototype.name = ""; - - /** - * TagTemplate displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @instance - */ - TagTemplate.prototype.displayName = ""; - - /** - * TagTemplate isPubliclyReadable. - * @member {boolean} isPubliclyReadable - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @instance - */ - TagTemplate.prototype.isPubliclyReadable = false; - - /** - * TagTemplate fields. - * @member {Object.} fields - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @instance - */ - TagTemplate.prototype.fields = $util.emptyObject; - - /** - * Creates a new TagTemplate instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @static - * @param {google.cloud.datacatalog.v1.ITagTemplate=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.TagTemplate} TagTemplate instance - */ - TagTemplate.create = function create(properties) { - return new TagTemplate(properties); - }; - - /** - * Encodes the specified TagTemplate message. Does not implicitly {@link google.cloud.datacatalog.v1.TagTemplate.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @static - * @param {google.cloud.datacatalog.v1.ITagTemplate} message TagTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagTemplate.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.datacatalog.v1.TagTemplateField.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.isPubliclyReadable != null && Object.hasOwnProperty.call(message, "isPubliclyReadable")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isPubliclyReadable); - return writer; - }; - - /** - * Encodes the specified TagTemplate message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TagTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @static - * @param {google.cloud.datacatalog.v1.ITagTemplate} message TagTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TagTemplate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.TagTemplate} TagTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagTemplate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.TagTemplate(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 5: { - message.isPubliclyReadable = reader.bool(); - break; - } - case 3: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.datacatalog.v1.TagTemplateField.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TagTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.TagTemplate} TagTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagTemplate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TagTemplate message. - * @function verify - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TagTemplate.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.isPubliclyReadable != null && message.hasOwnProperty("isPubliclyReadable")) - if (typeof message.isPubliclyReadable !== "boolean") - return "isPubliclyReadable: boolean expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.TagTemplateField.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a TagTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.TagTemplate} TagTemplate - */ - TagTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.TagTemplate) - return object; - var message = new $root.google.cloud.datacatalog.v1.TagTemplate(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.isPubliclyReadable != null) - message.isPubliclyReadable = Boolean(object.isPubliclyReadable); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.cloud.datacatalog.v1.TagTemplate.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.TagTemplate.fields: object expected"); - message.fields[keys[i]] = $root.google.cloud.datacatalog.v1.TagTemplateField.fromObject(object.fields[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a TagTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @static - * @param {google.cloud.datacatalog.v1.TagTemplate} message TagTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TagTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.isPubliclyReadable = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.cloud.datacatalog.v1.TagTemplateField.toObject(message.fields[keys2[j]], options); - } - if (message.isPubliclyReadable != null && message.hasOwnProperty("isPubliclyReadable")) - object.isPubliclyReadable = message.isPubliclyReadable; - return object; - }; - - /** - * Converts this TagTemplate to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @instance - * @returns {Object.} JSON object - */ - TagTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TagTemplate - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.TagTemplate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TagTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.TagTemplate"; - }; - - return TagTemplate; - })(); - - v1.TagTemplateField = (function() { - - /** - * Properties of a TagTemplateField. - * @memberof google.cloud.datacatalog.v1 - * @interface ITagTemplateField - * @property {string|null} [name] TagTemplateField name - * @property {string|null} [displayName] TagTemplateField displayName - * @property {google.cloud.datacatalog.v1.IFieldType|null} [type] TagTemplateField type - * @property {boolean|null} [isRequired] TagTemplateField isRequired - * @property {string|null} [description] TagTemplateField description - * @property {number|null} [order] TagTemplateField order - */ - - /** - * Constructs a new TagTemplateField. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a TagTemplateField. - * @implements ITagTemplateField - * @constructor - * @param {google.cloud.datacatalog.v1.ITagTemplateField=} [properties] Properties to set - */ - function TagTemplateField(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TagTemplateField name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.name = ""; - - /** - * TagTemplateField displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.displayName = ""; - - /** - * TagTemplateField type. - * @member {google.cloud.datacatalog.v1.IFieldType|null|undefined} type - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.type = null; - - /** - * TagTemplateField isRequired. - * @member {boolean} isRequired - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.isRequired = false; - - /** - * TagTemplateField description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.description = ""; - - /** - * TagTemplateField order. - * @member {number} order - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.order = 0; - - /** - * Creates a new TagTemplateField instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @static - * @param {google.cloud.datacatalog.v1.ITagTemplateField=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.TagTemplateField} TagTemplateField instance - */ - TagTemplateField.create = function create(properties) { - return new TagTemplateField(properties); - }; - - /** - * Encodes the specified TagTemplateField message. Does not implicitly {@link google.cloud.datacatalog.v1.TagTemplateField.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @static - * @param {google.cloud.datacatalog.v1.ITagTemplateField} message TagTemplateField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagTemplateField.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.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.cloud.datacatalog.v1.FieldType.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.isRequired != null && Object.hasOwnProperty.call(message, "isRequired")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isRequired); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.order != null && Object.hasOwnProperty.call(message, "order")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.order); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified TagTemplateField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.TagTemplateField.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @static - * @param {google.cloud.datacatalog.v1.ITagTemplateField} message TagTemplateField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagTemplateField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TagTemplateField message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.TagTemplateField} TagTemplateField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagTemplateField.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.TagTemplateField(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: { - message.name = reader.string(); - break; - } - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.type = $root.google.cloud.datacatalog.v1.FieldType.decode(reader, reader.uint32()); - break; - } - case 3: { - message.isRequired = reader.bool(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.order = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TagTemplateField message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.TagTemplateField} TagTemplateField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagTemplateField.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TagTemplateField message. - * @function verify - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TagTemplateField.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { - var error = $root.google.cloud.datacatalog.v1.FieldType.verify(message.type); - if (error) - return "type." + error; - } - if (message.isRequired != null && message.hasOwnProperty("isRequired")) - if (typeof message.isRequired !== "boolean") - return "isRequired: boolean expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.order != null && message.hasOwnProperty("order")) - if (!$util.isInteger(message.order)) - return "order: integer expected"; - return null; - }; - - /** - * Creates a TagTemplateField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.TagTemplateField} TagTemplateField - */ - TagTemplateField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.TagTemplateField) - return object; - var message = new $root.google.cloud.datacatalog.v1.TagTemplateField(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.type != null) { - if (typeof object.type !== "object") - throw TypeError(".google.cloud.datacatalog.v1.TagTemplateField.type: object expected"); - message.type = $root.google.cloud.datacatalog.v1.FieldType.fromObject(object.type); - } - if (object.isRequired != null) - message.isRequired = Boolean(object.isRequired); - if (object.description != null) - message.description = String(object.description); - if (object.order != null) - message.order = object.order | 0; - return message; - }; - - /** - * Creates a plain object from a TagTemplateField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @static - * @param {google.cloud.datacatalog.v1.TagTemplateField} message TagTemplateField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TagTemplateField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.type = null; - object.isRequired = false; - object.description = ""; - object.order = 0; - object.name = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.cloud.datacatalog.v1.FieldType.toObject(message.type, options); - if (message.isRequired != null && message.hasOwnProperty("isRequired")) - object.isRequired = message.isRequired; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.order != null && message.hasOwnProperty("order")) - object.order = message.order; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this TagTemplateField to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @instance - * @returns {Object.} JSON object - */ - TagTemplateField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TagTemplateField - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.TagTemplateField - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TagTemplateField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.TagTemplateField"; - }; - - return TagTemplateField; - })(); - - v1.FieldType = (function() { - - /** - * Properties of a FieldType. - * @memberof google.cloud.datacatalog.v1 - * @interface IFieldType - * @property {google.cloud.datacatalog.v1.FieldType.PrimitiveType|null} [primitiveType] FieldType primitiveType - * @property {google.cloud.datacatalog.v1.FieldType.IEnumType|null} [enumType] FieldType enumType - */ - - /** - * Constructs a new FieldType. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a FieldType. - * @implements IFieldType - * @constructor - * @param {google.cloud.datacatalog.v1.IFieldType=} [properties] Properties to set - */ - function FieldType(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldType primitiveType. - * @member {google.cloud.datacatalog.v1.FieldType.PrimitiveType|null|undefined} primitiveType - * @memberof google.cloud.datacatalog.v1.FieldType - * @instance - */ - FieldType.prototype.primitiveType = null; - - /** - * FieldType enumType. - * @member {google.cloud.datacatalog.v1.FieldType.IEnumType|null|undefined} enumType - * @memberof google.cloud.datacatalog.v1.FieldType - * @instance - */ - FieldType.prototype.enumType = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FieldType typeDecl. - * @member {"primitiveType"|"enumType"|undefined} typeDecl - * @memberof google.cloud.datacatalog.v1.FieldType - * @instance - */ - Object.defineProperty(FieldType.prototype, "typeDecl", { - get: $util.oneOfGetter($oneOfFields = ["primitiveType", "enumType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FieldType instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.FieldType - * @static - * @param {google.cloud.datacatalog.v1.IFieldType=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.FieldType} FieldType instance - */ - FieldType.create = function create(properties) { - return new FieldType(properties); - }; - - /** - * Encodes the specified FieldType message. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.FieldType - * @static - * @param {google.cloud.datacatalog.v1.IFieldType} message FieldType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldType.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.primitiveType != null && Object.hasOwnProperty.call(message, "primitiveType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.primitiveType); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - $root.google.cloud.datacatalog.v1.FieldType.EnumType.encode(message.enumType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.FieldType - * @static - * @param {google.cloud.datacatalog.v1.IFieldType} message FieldType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldType message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.FieldType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.FieldType} FieldType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.FieldType(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.primitiveType = reader.int32(); - break; - } - case 2: { - message.enumType = $root.google.cloud.datacatalog.v1.FieldType.EnumType.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.FieldType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.FieldType} FieldType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldType message. - * @function verify - * @memberof google.cloud.datacatalog.v1.FieldType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldType.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) { - properties.typeDecl = 1; - switch (message.primitiveType) { - default: - return "primitiveType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (properties.typeDecl === 1) - return "typeDecl: multiple values"; - properties.typeDecl = 1; - { - var error = $root.google.cloud.datacatalog.v1.FieldType.EnumType.verify(message.enumType); - if (error) - return "enumType." + error; - } - } - return null; - }; - - /** - * Creates a FieldType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.FieldType - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.FieldType} FieldType - */ - FieldType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.FieldType) - return object; - var message = new $root.google.cloud.datacatalog.v1.FieldType(); - switch (object.primitiveType) { - default: - if (typeof object.primitiveType === "number") { - message.primitiveType = object.primitiveType; - break; - } - break; - case "PRIMITIVE_TYPE_UNSPECIFIED": - case 0: - message.primitiveType = 0; - break; - case "DOUBLE": - case 1: - message.primitiveType = 1; - break; - case "STRING": - case 2: - message.primitiveType = 2; - break; - case "BOOL": - case 3: - message.primitiveType = 3; - break; - case "TIMESTAMP": - case 4: - message.primitiveType = 4; - break; - case "RICHTEXT": - case 5: - message.primitiveType = 5; - break; - } - if (object.enumType != null) { - if (typeof object.enumType !== "object") - throw TypeError(".google.cloud.datacatalog.v1.FieldType.enumType: object expected"); - message.enumType = $root.google.cloud.datacatalog.v1.FieldType.EnumType.fromObject(object.enumType); - } - return message; - }; - - /** - * Creates a plain object from a FieldType message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.FieldType - * @static - * @param {google.cloud.datacatalog.v1.FieldType} message FieldType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) { - object.primitiveType = options.enums === String ? $root.google.cloud.datacatalog.v1.FieldType.PrimitiveType[message.primitiveType] === undefined ? message.primitiveType : $root.google.cloud.datacatalog.v1.FieldType.PrimitiveType[message.primitiveType] : message.primitiveType; - if (options.oneofs) - object.typeDecl = "primitiveType"; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - object.enumType = $root.google.cloud.datacatalog.v1.FieldType.EnumType.toObject(message.enumType, options); - if (options.oneofs) - object.typeDecl = "enumType"; - } - return object; - }; - - /** - * Converts this FieldType to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.FieldType - * @instance - * @returns {Object.} JSON object - */ - FieldType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldType - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.FieldType - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.FieldType"; - }; - - /** - * PrimitiveType enum. - * @name google.cloud.datacatalog.v1.FieldType.PrimitiveType - * @enum {number} - * @property {number} PRIMITIVE_TYPE_UNSPECIFIED=0 PRIMITIVE_TYPE_UNSPECIFIED value - * @property {number} DOUBLE=1 DOUBLE value - * @property {number} STRING=2 STRING value - * @property {number} BOOL=3 BOOL value - * @property {number} TIMESTAMP=4 TIMESTAMP value - * @property {number} RICHTEXT=5 RICHTEXT value - */ - FieldType.PrimitiveType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIMITIVE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DOUBLE"] = 1; - values[valuesById[2] = "STRING"] = 2; - values[valuesById[3] = "BOOL"] = 3; - values[valuesById[4] = "TIMESTAMP"] = 4; - values[valuesById[5] = "RICHTEXT"] = 5; - return values; - })(); - - FieldType.EnumType = (function() { - - /** - * Properties of an EnumType. - * @memberof google.cloud.datacatalog.v1.FieldType - * @interface IEnumType - * @property {Array.|null} [allowedValues] EnumType allowedValues - */ - - /** - * Constructs a new EnumType. - * @memberof google.cloud.datacatalog.v1.FieldType - * @classdesc Represents an EnumType. - * @implements IEnumType - * @constructor - * @param {google.cloud.datacatalog.v1.FieldType.IEnumType=} [properties] Properties to set - */ - function EnumType(properties) { - this.allowedValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumType allowedValues. - * @member {Array.} allowedValues - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @instance - */ - EnumType.prototype.allowedValues = $util.emptyArray; - - /** - * Creates a new EnumType instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1.FieldType.IEnumType=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.FieldType.EnumType} EnumType instance - */ - EnumType.create = function create(properties) { - return new EnumType(properties); - }; - - /** - * Encodes the specified EnumType message. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.EnumType.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1.FieldType.IEnumType} message EnumType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumType.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowedValues != null && message.allowedValues.length) - for (var i = 0; i < message.allowedValues.length; ++i) - $root.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.encode(message.allowedValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.EnumType.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1.FieldType.IEnumType} message EnumType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumType message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.FieldType.EnumType} EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.FieldType.EnumType(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.allowedValues && message.allowedValues.length)) - message.allowedValues = []; - message.allowedValues.push($root.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.FieldType.EnumType} EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumType message. - * @function verify - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumType.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowedValues != null && message.hasOwnProperty("allowedValues")) { - if (!Array.isArray(message.allowedValues)) - return "allowedValues: array expected"; - for (var i = 0; i < message.allowedValues.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.verify(message.allowedValues[i]); - if (error) - return "allowedValues." + error; - } - } - return null; - }; - - /** - * Creates an EnumType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.FieldType.EnumType} EnumType - */ - EnumType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.FieldType.EnumType) - return object; - var message = new $root.google.cloud.datacatalog.v1.FieldType.EnumType(); - if (object.allowedValues) { - if (!Array.isArray(object.allowedValues)) - throw TypeError(".google.cloud.datacatalog.v1.FieldType.EnumType.allowedValues: array expected"); - message.allowedValues = []; - for (var i = 0; i < object.allowedValues.length; ++i) { - if (typeof object.allowedValues[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.FieldType.EnumType.allowedValues: object expected"); - message.allowedValues[i] = $root.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.fromObject(object.allowedValues[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumType message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1.FieldType.EnumType} message EnumType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.allowedValues = []; - if (message.allowedValues && message.allowedValues.length) { - object.allowedValues = []; - for (var j = 0; j < message.allowedValues.length; ++j) - object.allowedValues[j] = $root.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.toObject(message.allowedValues[j], options); - } - return object; - }; - - /** - * Converts this EnumType to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @instance - * @returns {Object.} JSON object - */ - EnumType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumType - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.FieldType.EnumType"; - }; - - EnumType.EnumValue = (function() { - - /** - * Properties of an EnumValue. - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @interface IEnumValue - * @property {string|null} [displayName] EnumValue displayName - */ - - /** - * Constructs a new EnumValue. - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType - * @classdesc Represents an EnumValue. - * @implements IEnumValue - * @constructor - * @param {google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue=} [properties] Properties to set - */ - function EnumValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValue displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @instance - */ - EnumValue.prototype.displayName = ""; - - /** - * Creates a new EnumValue instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue} EnumValue instance - */ - EnumValue.create = function create(properties) { - return new EnumValue(properties); - }; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.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); - return writer; - }; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1.FieldType.EnumType.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValue message. - * @function verify - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValue.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"; - return null; - }; - - /** - * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue} EnumValue - */ - EnumValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue) - return object; - var message = new $root.google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue(); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue} message EnumValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.displayName = ""; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this EnumValue to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @instance - * @returns {Object.} JSON object - */ - EnumValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValue - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.FieldType.EnumType.EnumValue"; - }; - - return EnumValue; - })(); - - return EnumType; - })(); - - return FieldType; - })(); - - v1.UsageStats = (function() { - - /** - * Properties of a UsageStats. - * @memberof google.cloud.datacatalog.v1 - * @interface IUsageStats - * @property {number|null} [totalCompletions] UsageStats totalCompletions - * @property {number|null} [totalFailures] UsageStats totalFailures - * @property {number|null} [totalCancellations] UsageStats totalCancellations - * @property {number|null} [totalExecutionTimeForCompletionsMillis] UsageStats totalExecutionTimeForCompletionsMillis - */ - - /** - * Constructs a new UsageStats. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a UsageStats. - * @implements IUsageStats - * @constructor - * @param {google.cloud.datacatalog.v1.IUsageStats=} [properties] Properties to set - */ - function UsageStats(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UsageStats totalCompletions. - * @member {number} totalCompletions - * @memberof google.cloud.datacatalog.v1.UsageStats - * @instance - */ - UsageStats.prototype.totalCompletions = 0; - - /** - * UsageStats totalFailures. - * @member {number} totalFailures - * @memberof google.cloud.datacatalog.v1.UsageStats - * @instance - */ - UsageStats.prototype.totalFailures = 0; - - /** - * UsageStats totalCancellations. - * @member {number} totalCancellations - * @memberof google.cloud.datacatalog.v1.UsageStats - * @instance - */ - UsageStats.prototype.totalCancellations = 0; - - /** - * UsageStats totalExecutionTimeForCompletionsMillis. - * @member {number} totalExecutionTimeForCompletionsMillis - * @memberof google.cloud.datacatalog.v1.UsageStats - * @instance - */ - UsageStats.prototype.totalExecutionTimeForCompletionsMillis = 0; - - /** - * Creates a new UsageStats instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UsageStats - * @static - * @param {google.cloud.datacatalog.v1.IUsageStats=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UsageStats} UsageStats instance - */ - UsageStats.create = function create(properties) { - return new UsageStats(properties); - }; - - /** - * Encodes the specified UsageStats message. Does not implicitly {@link google.cloud.datacatalog.v1.UsageStats.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UsageStats - * @static - * @param {google.cloud.datacatalog.v1.IUsageStats} message UsageStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsageStats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalCompletions != null && Object.hasOwnProperty.call(message, "totalCompletions")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.totalCompletions); - if (message.totalFailures != null && Object.hasOwnProperty.call(message, "totalFailures")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.totalFailures); - if (message.totalCancellations != null && Object.hasOwnProperty.call(message, "totalCancellations")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.totalCancellations); - if (message.totalExecutionTimeForCompletionsMillis != null && Object.hasOwnProperty.call(message, "totalExecutionTimeForCompletionsMillis")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.totalExecutionTimeForCompletionsMillis); - return writer; - }; - - /** - * Encodes the specified UsageStats message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UsageStats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UsageStats - * @static - * @param {google.cloud.datacatalog.v1.IUsageStats} message UsageStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsageStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UsageStats message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UsageStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UsageStats} UsageStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsageStats.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UsageStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.totalCompletions = reader.float(); - break; - } - case 2: { - message.totalFailures = reader.float(); - break; - } - case 3: { - message.totalCancellations = reader.float(); - break; - } - case 4: { - message.totalExecutionTimeForCompletionsMillis = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UsageStats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UsageStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UsageStats} UsageStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsageStats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UsageStats message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UsageStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UsageStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.totalCompletions != null && message.hasOwnProperty("totalCompletions")) - if (typeof message.totalCompletions !== "number") - return "totalCompletions: number expected"; - if (message.totalFailures != null && message.hasOwnProperty("totalFailures")) - if (typeof message.totalFailures !== "number") - return "totalFailures: number expected"; - if (message.totalCancellations != null && message.hasOwnProperty("totalCancellations")) - if (typeof message.totalCancellations !== "number") - return "totalCancellations: number expected"; - if (message.totalExecutionTimeForCompletionsMillis != null && message.hasOwnProperty("totalExecutionTimeForCompletionsMillis")) - if (typeof message.totalExecutionTimeForCompletionsMillis !== "number") - return "totalExecutionTimeForCompletionsMillis: number expected"; - return null; - }; - - /** - * Creates a UsageStats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UsageStats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UsageStats} UsageStats - */ - UsageStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UsageStats) - return object; - var message = new $root.google.cloud.datacatalog.v1.UsageStats(); - if (object.totalCompletions != null) - message.totalCompletions = Number(object.totalCompletions); - if (object.totalFailures != null) - message.totalFailures = Number(object.totalFailures); - if (object.totalCancellations != null) - message.totalCancellations = Number(object.totalCancellations); - if (object.totalExecutionTimeForCompletionsMillis != null) - message.totalExecutionTimeForCompletionsMillis = Number(object.totalExecutionTimeForCompletionsMillis); - return message; - }; - - /** - * Creates a plain object from a UsageStats message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UsageStats - * @static - * @param {google.cloud.datacatalog.v1.UsageStats} message UsageStats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UsageStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.totalCompletions = 0; - object.totalFailures = 0; - object.totalCancellations = 0; - object.totalExecutionTimeForCompletionsMillis = 0; - } - if (message.totalCompletions != null && message.hasOwnProperty("totalCompletions")) - object.totalCompletions = options.json && !isFinite(message.totalCompletions) ? String(message.totalCompletions) : message.totalCompletions; - if (message.totalFailures != null && message.hasOwnProperty("totalFailures")) - object.totalFailures = options.json && !isFinite(message.totalFailures) ? String(message.totalFailures) : message.totalFailures; - if (message.totalCancellations != null && message.hasOwnProperty("totalCancellations")) - object.totalCancellations = options.json && !isFinite(message.totalCancellations) ? String(message.totalCancellations) : message.totalCancellations; - if (message.totalExecutionTimeForCompletionsMillis != null && message.hasOwnProperty("totalExecutionTimeForCompletionsMillis")) - object.totalExecutionTimeForCompletionsMillis = options.json && !isFinite(message.totalExecutionTimeForCompletionsMillis) ? String(message.totalExecutionTimeForCompletionsMillis) : message.totalExecutionTimeForCompletionsMillis; - return object; - }; - - /** - * Converts this UsageStats to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UsageStats - * @instance - * @returns {Object.} JSON object - */ - UsageStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UsageStats - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UsageStats - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UsageStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UsageStats"; - }; - - return UsageStats; - })(); - - v1.UsageSignal = (function() { - - /** - * Properties of a UsageSignal. - * @memberof google.cloud.datacatalog.v1 - * @interface IUsageSignal - * @property {google.protobuf.ITimestamp|null} [updateTime] UsageSignal updateTime - * @property {Object.|null} [usageWithinTimeRange] UsageSignal usageWithinTimeRange - */ - - /** - * Constructs a new UsageSignal. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a UsageSignal. - * @implements IUsageSignal - * @constructor - * @param {google.cloud.datacatalog.v1.IUsageSignal=} [properties] Properties to set - */ - function UsageSignal(properties) { - this.usageWithinTimeRange = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UsageSignal updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @instance - */ - UsageSignal.prototype.updateTime = null; - - /** - * UsageSignal usageWithinTimeRange. - * @member {Object.} usageWithinTimeRange - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @instance - */ - UsageSignal.prototype.usageWithinTimeRange = $util.emptyObject; - - /** - * Creates a new UsageSignal instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @static - * @param {google.cloud.datacatalog.v1.IUsageSignal=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UsageSignal} UsageSignal instance - */ - UsageSignal.create = function create(properties) { - return new UsageSignal(properties); - }; - - /** - * Encodes the specified UsageSignal message. Does not implicitly {@link google.cloud.datacatalog.v1.UsageSignal.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @static - * @param {google.cloud.datacatalog.v1.IUsageSignal} message UsageSignal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsageSignal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.usageWithinTimeRange != null && Object.hasOwnProperty.call(message, "usageWithinTimeRange")) - for (var keys = Object.keys(message.usageWithinTimeRange), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.datacatalog.v1.UsageStats.encode(message.usageWithinTimeRange[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified UsageSignal message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UsageSignal.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @static - * @param {google.cloud.datacatalog.v1.IUsageSignal} message UsageSignal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UsageSignal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UsageSignal message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UsageSignal} UsageSignal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsageSignal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UsageSignal(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.usageWithinTimeRange === $util.emptyObject) - message.usageWithinTimeRange = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.datacatalog.v1.UsageStats.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.usageWithinTimeRange[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UsageSignal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UsageSignal} UsageSignal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UsageSignal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UsageSignal message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UsageSignal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.usageWithinTimeRange != null && message.hasOwnProperty("usageWithinTimeRange")) { - if (!$util.isObject(message.usageWithinTimeRange)) - return "usageWithinTimeRange: object expected"; - var key = Object.keys(message.usageWithinTimeRange); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.UsageStats.verify(message.usageWithinTimeRange[key[i]]); - if (error) - return "usageWithinTimeRange." + error; - } - } - return null; - }; - - /** - * Creates a UsageSignal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UsageSignal} UsageSignal - */ - UsageSignal.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UsageSignal) - return object; - var message = new $root.google.cloud.datacatalog.v1.UsageSignal(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UsageSignal.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.usageWithinTimeRange) { - if (typeof object.usageWithinTimeRange !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UsageSignal.usageWithinTimeRange: object expected"); - message.usageWithinTimeRange = {}; - for (var keys = Object.keys(object.usageWithinTimeRange), i = 0; i < keys.length; ++i) { - if (typeof object.usageWithinTimeRange[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UsageSignal.usageWithinTimeRange: object expected"); - message.usageWithinTimeRange[keys[i]] = $root.google.cloud.datacatalog.v1.UsageStats.fromObject(object.usageWithinTimeRange[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a UsageSignal message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @static - * @param {google.cloud.datacatalog.v1.UsageSignal} message UsageSignal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UsageSignal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.usageWithinTimeRange = {}; - if (options.defaults) - object.updateTime = null; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - var keys2; - if (message.usageWithinTimeRange && (keys2 = Object.keys(message.usageWithinTimeRange)).length) { - object.usageWithinTimeRange = {}; - for (var j = 0; j < keys2.length; ++j) - object.usageWithinTimeRange[keys2[j]] = $root.google.cloud.datacatalog.v1.UsageStats.toObject(message.usageWithinTimeRange[keys2[j]], options); - } - return object; - }; - - /** - * Converts this UsageSignal to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @instance - * @returns {Object.} JSON object - */ - UsageSignal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UsageSignal - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UsageSignal - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UsageSignal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UsageSignal"; - }; - - return UsageSignal; - })(); - - v1.PolicyTagManager = (function() { - - /** - * Constructs a new PolicyTagManager service. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a PolicyTagManager - * @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 PolicyTagManager(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (PolicyTagManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PolicyTagManager; - - /** - * Creates new PolicyTagManager service using the specified rpc implementation. - * @function create - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @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 {PolicyTagManager} RPC service. Useful where requests and/or responses are streamed. - */ - PolicyTagManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|createTaxonomy}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef CreateTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Taxonomy} [response] Taxonomy - */ - - /** - * Calls CreateTaxonomy. - * @function createTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.ICreateTaxonomyRequest} request CreateTaxonomyRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.CreateTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.createTaxonomy = function createTaxonomy(request, callback) { - return this.rpcCall(createTaxonomy, $root.google.cloud.datacatalog.v1.CreateTaxonomyRequest, $root.google.cloud.datacatalog.v1.Taxonomy, request, callback); - }, "name", { value: "CreateTaxonomy" }); - - /** - * Calls CreateTaxonomy. - * @function createTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.ICreateTaxonomyRequest} request CreateTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|deleteTaxonomy}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef DeleteTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTaxonomy. - * @function deleteTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteTaxonomyRequest} request DeleteTaxonomyRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.DeleteTaxonomyCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.deleteTaxonomy = function deleteTaxonomy(request, callback) { - return this.rpcCall(deleteTaxonomy, $root.google.cloud.datacatalog.v1.DeleteTaxonomyRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTaxonomy" }); - - /** - * Calls DeleteTaxonomy. - * @function deleteTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IDeleteTaxonomyRequest} request DeleteTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|updateTaxonomy}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef UpdateTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Taxonomy} [response] Taxonomy - */ - - /** - * Calls UpdateTaxonomy. - * @function updateTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateTaxonomyRequest} request UpdateTaxonomyRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.UpdateTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.updateTaxonomy = function updateTaxonomy(request, callback) { - return this.rpcCall(updateTaxonomy, $root.google.cloud.datacatalog.v1.UpdateTaxonomyRequest, $root.google.cloud.datacatalog.v1.Taxonomy, request, callback); - }, "name", { value: "UpdateTaxonomy" }); - - /** - * Calls UpdateTaxonomy. - * @function updateTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IUpdateTaxonomyRequest} request UpdateTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|listTaxonomies}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef ListTaxonomiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.ListTaxonomiesResponse} [response] ListTaxonomiesResponse - */ - - /** - * Calls ListTaxonomies. - * @function listTaxonomies - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IListTaxonomiesRequest} request ListTaxonomiesRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomiesCallback} callback Node-style callback called with the error, if any, and ListTaxonomiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.listTaxonomies = function listTaxonomies(request, callback) { - return this.rpcCall(listTaxonomies, $root.google.cloud.datacatalog.v1.ListTaxonomiesRequest, $root.google.cloud.datacatalog.v1.ListTaxonomiesResponse, request, callback); - }, "name", { value: "ListTaxonomies" }); - - /** - * Calls ListTaxonomies. - * @function listTaxonomies - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IListTaxonomiesRequest} request ListTaxonomiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|getTaxonomy}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef GetTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Taxonomy} [response] Taxonomy - */ - - /** - * Calls GetTaxonomy. - * @function getTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IGetTaxonomyRequest} request GetTaxonomyRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.GetTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.getTaxonomy = function getTaxonomy(request, callback) { - return this.rpcCall(getTaxonomy, $root.google.cloud.datacatalog.v1.GetTaxonomyRequest, $root.google.cloud.datacatalog.v1.Taxonomy, request, callback); - }, "name", { value: "GetTaxonomy" }); - - /** - * Calls GetTaxonomy. - * @function getTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IGetTaxonomyRequest} request GetTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|createPolicyTag}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef CreatePolicyTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.PolicyTag} [response] PolicyTag - */ - - /** - * Calls CreatePolicyTag. - * @function createPolicyTag - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.ICreatePolicyTagRequest} request CreatePolicyTagRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.CreatePolicyTagCallback} callback Node-style callback called with the error, if any, and PolicyTag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.createPolicyTag = function createPolicyTag(request, callback) { - return this.rpcCall(createPolicyTag, $root.google.cloud.datacatalog.v1.CreatePolicyTagRequest, $root.google.cloud.datacatalog.v1.PolicyTag, request, callback); - }, "name", { value: "CreatePolicyTag" }); - - /** - * Calls CreatePolicyTag. - * @function createPolicyTag - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.ICreatePolicyTagRequest} request CreatePolicyTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|deletePolicyTag}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef DeletePolicyTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeletePolicyTag. - * @function deletePolicyTag - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IDeletePolicyTagRequest} request DeletePolicyTagRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.DeletePolicyTagCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.deletePolicyTag = function deletePolicyTag(request, callback) { - return this.rpcCall(deletePolicyTag, $root.google.cloud.datacatalog.v1.DeletePolicyTagRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePolicyTag" }); - - /** - * Calls DeletePolicyTag. - * @function deletePolicyTag - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IDeletePolicyTagRequest} request DeletePolicyTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|updatePolicyTag}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef UpdatePolicyTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.PolicyTag} [response] PolicyTag - */ - - /** - * Calls UpdatePolicyTag. - * @function updatePolicyTag - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IUpdatePolicyTagRequest} request UpdatePolicyTagRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.UpdatePolicyTagCallback} callback Node-style callback called with the error, if any, and PolicyTag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.updatePolicyTag = function updatePolicyTag(request, callback) { - return this.rpcCall(updatePolicyTag, $root.google.cloud.datacatalog.v1.UpdatePolicyTagRequest, $root.google.cloud.datacatalog.v1.PolicyTag, request, callback); - }, "name", { value: "UpdatePolicyTag" }); - - /** - * Calls UpdatePolicyTag. - * @function updatePolicyTag - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IUpdatePolicyTagRequest} request UpdatePolicyTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|listPolicyTags}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef ListPolicyTagsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.ListPolicyTagsResponse} [response] ListPolicyTagsResponse - */ - - /** - * Calls ListPolicyTags. - * @function listPolicyTags - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IListPolicyTagsRequest} request ListPolicyTagsRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTagsCallback} callback Node-style callback called with the error, if any, and ListPolicyTagsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.listPolicyTags = function listPolicyTags(request, callback) { - return this.rpcCall(listPolicyTags, $root.google.cloud.datacatalog.v1.ListPolicyTagsRequest, $root.google.cloud.datacatalog.v1.ListPolicyTagsResponse, request, callback); - }, "name", { value: "ListPolicyTags" }); - - /** - * Calls ListPolicyTags. - * @function listPolicyTags - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IListPolicyTagsRequest} request ListPolicyTagsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|getPolicyTag}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef GetPolicyTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.PolicyTag} [response] PolicyTag - */ - - /** - * Calls GetPolicyTag. - * @function getPolicyTag - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IGetPolicyTagRequest} request GetPolicyTagRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.GetPolicyTagCallback} callback Node-style callback called with the error, if any, and PolicyTag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.getPolicyTag = function getPolicyTag(request, callback) { - return this.rpcCall(getPolicyTag, $root.google.cloud.datacatalog.v1.GetPolicyTagRequest, $root.google.cloud.datacatalog.v1.PolicyTag, request, callback); - }, "name", { value: "GetPolicyTag" }); - - /** - * Calls GetPolicyTag. - * @function getPolicyTag - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1.IGetPolicyTagRequest} request GetPolicyTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|getIamPolicy}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|setIamPolicy}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManager|testIamPermissions}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManager.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1.PolicyTagManager - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return PolicyTagManager; - })(); - - v1.Taxonomy = (function() { - - /** - * Properties of a Taxonomy. - * @memberof google.cloud.datacatalog.v1 - * @interface ITaxonomy - * @property {string|null} [name] Taxonomy name - * @property {string|null} [displayName] Taxonomy displayName - * @property {string|null} [description] Taxonomy description - * @property {number|null} [policyTagCount] Taxonomy policyTagCount - * @property {google.cloud.datacatalog.v1.ISystemTimestamps|null} [taxonomyTimestamps] Taxonomy taxonomyTimestamps - * @property {Array.|null} [activatedPolicyTypes] Taxonomy activatedPolicyTypes - */ - - /** - * Constructs a new Taxonomy. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a Taxonomy. - * @implements ITaxonomy - * @constructor - * @param {google.cloud.datacatalog.v1.ITaxonomy=} [properties] Properties to set - */ - function Taxonomy(properties) { - this.activatedPolicyTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Taxonomy name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @instance - */ - Taxonomy.prototype.name = ""; - - /** - * Taxonomy displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @instance - */ - Taxonomy.prototype.displayName = ""; - - /** - * Taxonomy description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @instance - */ - Taxonomy.prototype.description = ""; - - /** - * Taxonomy policyTagCount. - * @member {number} policyTagCount - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @instance - */ - Taxonomy.prototype.policyTagCount = 0; - - /** - * Taxonomy taxonomyTimestamps. - * @member {google.cloud.datacatalog.v1.ISystemTimestamps|null|undefined} taxonomyTimestamps - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @instance - */ - Taxonomy.prototype.taxonomyTimestamps = null; - - /** - * Taxonomy activatedPolicyTypes. - * @member {Array.} activatedPolicyTypes - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @instance - */ - Taxonomy.prototype.activatedPolicyTypes = $util.emptyArray; - - /** - * Creates a new Taxonomy instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @static - * @param {google.cloud.datacatalog.v1.ITaxonomy=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.Taxonomy} Taxonomy instance - */ - Taxonomy.create = function create(properties) { - return new Taxonomy(properties); - }; - - /** - * Encodes the specified Taxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @static - * @param {google.cloud.datacatalog.v1.ITaxonomy} message Taxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Taxonomy.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.policyTagCount != null && Object.hasOwnProperty.call(message, "policyTagCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.policyTagCount); - if (message.taxonomyTimestamps != null && Object.hasOwnProperty.call(message, "taxonomyTimestamps")) - $root.google.cloud.datacatalog.v1.SystemTimestamps.encode(message.taxonomyTimestamps, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.activatedPolicyTypes != null && message.activatedPolicyTypes.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.activatedPolicyTypes.length; ++i) - writer.int32(message.activatedPolicyTypes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Taxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.Taxonomy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @static - * @param {google.cloud.datacatalog.v1.ITaxonomy} message Taxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Taxonomy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Taxonomy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.Taxonomy} Taxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Taxonomy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.Taxonomy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.policyTagCount = reader.int32(); - break; - } - case 5: { - message.taxonomyTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.activatedPolicyTypes && message.activatedPolicyTypes.length)) - message.activatedPolicyTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.activatedPolicyTypes.push(reader.int32()); - } else - message.activatedPolicyTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Taxonomy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.Taxonomy} Taxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Taxonomy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Taxonomy message. - * @function verify - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Taxonomy.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.policyTagCount != null && message.hasOwnProperty("policyTagCount")) - if (!$util.isInteger(message.policyTagCount)) - return "policyTagCount: integer expected"; - if (message.taxonomyTimestamps != null && message.hasOwnProperty("taxonomyTimestamps")) { - var error = $root.google.cloud.datacatalog.v1.SystemTimestamps.verify(message.taxonomyTimestamps); - if (error) - return "taxonomyTimestamps." + error; - } - if (message.activatedPolicyTypes != null && message.hasOwnProperty("activatedPolicyTypes")) { - if (!Array.isArray(message.activatedPolicyTypes)) - return "activatedPolicyTypes: array expected"; - for (var i = 0; i < message.activatedPolicyTypes.length; ++i) - switch (message.activatedPolicyTypes[i]) { - default: - return "activatedPolicyTypes: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a Taxonomy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.Taxonomy} Taxonomy - */ - Taxonomy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.Taxonomy) - return object; - var message = new $root.google.cloud.datacatalog.v1.Taxonomy(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.policyTagCount != null) - message.policyTagCount = object.policyTagCount | 0; - if (object.taxonomyTimestamps != null) { - if (typeof object.taxonomyTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1.Taxonomy.taxonomyTimestamps: object expected"); - message.taxonomyTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.fromObject(object.taxonomyTimestamps); - } - if (object.activatedPolicyTypes) { - if (!Array.isArray(object.activatedPolicyTypes)) - throw TypeError(".google.cloud.datacatalog.v1.Taxonomy.activatedPolicyTypes: array expected"); - message.activatedPolicyTypes = []; - for (var i = 0; i < object.activatedPolicyTypes.length; ++i) - switch (object.activatedPolicyTypes[i]) { - default: - if (typeof object.activatedPolicyTypes[i] === "number") { - message.activatedPolicyTypes[i] = object.activatedPolicyTypes[i]; - break; - } - case "POLICY_TYPE_UNSPECIFIED": - case 0: - message.activatedPolicyTypes[i] = 0; - break; - case "FINE_GRAINED_ACCESS_CONTROL": - case 1: - message.activatedPolicyTypes[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Taxonomy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @static - * @param {google.cloud.datacatalog.v1.Taxonomy} message Taxonomy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Taxonomy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.activatedPolicyTypes = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.policyTagCount = 0; - object.taxonomyTimestamps = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.policyTagCount != null && message.hasOwnProperty("policyTagCount")) - object.policyTagCount = message.policyTagCount; - if (message.taxonomyTimestamps != null && message.hasOwnProperty("taxonomyTimestamps")) - object.taxonomyTimestamps = $root.google.cloud.datacatalog.v1.SystemTimestamps.toObject(message.taxonomyTimestamps, options); - if (message.activatedPolicyTypes && message.activatedPolicyTypes.length) { - object.activatedPolicyTypes = []; - for (var j = 0; j < message.activatedPolicyTypes.length; ++j) - object.activatedPolicyTypes[j] = options.enums === String ? $root.google.cloud.datacatalog.v1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] === undefined ? message.activatedPolicyTypes[j] : $root.google.cloud.datacatalog.v1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] : message.activatedPolicyTypes[j]; - } - return object; - }; - - /** - * Converts this Taxonomy to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @instance - * @returns {Object.} JSON object - */ - Taxonomy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Taxonomy - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.Taxonomy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Taxonomy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.Taxonomy"; - }; - - /** - * PolicyType enum. - * @name google.cloud.datacatalog.v1.Taxonomy.PolicyType - * @enum {number} - * @property {number} POLICY_TYPE_UNSPECIFIED=0 POLICY_TYPE_UNSPECIFIED value - * @property {number} FINE_GRAINED_ACCESS_CONTROL=1 FINE_GRAINED_ACCESS_CONTROL value - */ - Taxonomy.PolicyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "POLICY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FINE_GRAINED_ACCESS_CONTROL"] = 1; - return values; - })(); - - return Taxonomy; - })(); - - v1.PolicyTag = (function() { - - /** - * Properties of a PolicyTag. - * @memberof google.cloud.datacatalog.v1 - * @interface IPolicyTag - * @property {string|null} [name] PolicyTag name - * @property {string|null} [displayName] PolicyTag displayName - * @property {string|null} [description] PolicyTag description - * @property {string|null} [parentPolicyTag] PolicyTag parentPolicyTag - * @property {Array.|null} [childPolicyTags] PolicyTag childPolicyTags - */ - - /** - * Constructs a new PolicyTag. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a PolicyTag. - * @implements IPolicyTag - * @constructor - * @param {google.cloud.datacatalog.v1.IPolicyTag=} [properties] Properties to set - */ - function PolicyTag(properties) { - this.childPolicyTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PolicyTag name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @instance - */ - PolicyTag.prototype.name = ""; - - /** - * PolicyTag displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @instance - */ - PolicyTag.prototype.displayName = ""; - - /** - * PolicyTag description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @instance - */ - PolicyTag.prototype.description = ""; - - /** - * PolicyTag parentPolicyTag. - * @member {string} parentPolicyTag - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @instance - */ - PolicyTag.prototype.parentPolicyTag = ""; - - /** - * PolicyTag childPolicyTags. - * @member {Array.} childPolicyTags - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @instance - */ - PolicyTag.prototype.childPolicyTags = $util.emptyArray; - - /** - * Creates a new PolicyTag instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @static - * @param {google.cloud.datacatalog.v1.IPolicyTag=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.PolicyTag} PolicyTag instance - */ - PolicyTag.create = function create(properties) { - return new PolicyTag(properties); - }; - - /** - * Encodes the specified PolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1.PolicyTag.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @static - * @param {google.cloud.datacatalog.v1.IPolicyTag} message PolicyTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyTag.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.parentPolicyTag != null && Object.hasOwnProperty.call(message, "parentPolicyTag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentPolicyTag); - if (message.childPolicyTags != null && message.childPolicyTags.length) - for (var i = 0; i < message.childPolicyTags.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.childPolicyTags[i]); - return writer; - }; - - /** - * Encodes the specified PolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.PolicyTag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @static - * @param {google.cloud.datacatalog.v1.IPolicyTag} message PolicyTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PolicyTag message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.PolicyTag} PolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyTag.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.PolicyTag(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.parentPolicyTag = reader.string(); - break; - } - case 5: { - if (!(message.childPolicyTags && message.childPolicyTags.length)) - message.childPolicyTags = []; - message.childPolicyTags.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PolicyTag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.PolicyTag} PolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyTag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PolicyTag message. - * @function verify - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyTag.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.parentPolicyTag != null && message.hasOwnProperty("parentPolicyTag")) - if (!$util.isString(message.parentPolicyTag)) - return "parentPolicyTag: string expected"; - if (message.childPolicyTags != null && message.hasOwnProperty("childPolicyTags")) { - if (!Array.isArray(message.childPolicyTags)) - return "childPolicyTags: array expected"; - for (var i = 0; i < message.childPolicyTags.length; ++i) - if (!$util.isString(message.childPolicyTags[i])) - return "childPolicyTags: string[] expected"; - } - return null; - }; - - /** - * Creates a PolicyTag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.PolicyTag} PolicyTag - */ - PolicyTag.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.PolicyTag) - return object; - var message = new $root.google.cloud.datacatalog.v1.PolicyTag(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.parentPolicyTag != null) - message.parentPolicyTag = String(object.parentPolicyTag); - if (object.childPolicyTags) { - if (!Array.isArray(object.childPolicyTags)) - throw TypeError(".google.cloud.datacatalog.v1.PolicyTag.childPolicyTags: array expected"); - message.childPolicyTags = []; - for (var i = 0; i < object.childPolicyTags.length; ++i) - message.childPolicyTags[i] = String(object.childPolicyTags[i]); - } - return message; - }; - - /** - * Creates a plain object from a PolicyTag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @static - * @param {google.cloud.datacatalog.v1.PolicyTag} message PolicyTag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyTag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.childPolicyTags = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.parentPolicyTag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.parentPolicyTag != null && message.hasOwnProperty("parentPolicyTag")) - object.parentPolicyTag = message.parentPolicyTag; - if (message.childPolicyTags && message.childPolicyTags.length) { - object.childPolicyTags = []; - for (var j = 0; j < message.childPolicyTags.length; ++j) - object.childPolicyTags[j] = message.childPolicyTags[j]; - } - return object; - }; - - /** - * Converts this PolicyTag to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @instance - * @returns {Object.} JSON object - */ - PolicyTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PolicyTag - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.PolicyTag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.PolicyTag"; - }; - - return PolicyTag; - })(); - - v1.CreateTaxonomyRequest = (function() { - - /** - * Properties of a CreateTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ICreateTaxonomyRequest - * @property {string|null} [parent] CreateTaxonomyRequest parent - * @property {google.cloud.datacatalog.v1.ITaxonomy|null} [taxonomy] CreateTaxonomyRequest taxonomy - */ - - /** - * Constructs a new CreateTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CreateTaxonomyRequest. - * @implements ICreateTaxonomyRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ICreateTaxonomyRequest=} [properties] Properties to set - */ - function CreateTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTaxonomyRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @instance - */ - CreateTaxonomyRequest.prototype.parent = ""; - - /** - * CreateTaxonomyRequest taxonomy. - * @member {google.cloud.datacatalog.v1.ITaxonomy|null|undefined} taxonomy - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @instance - */ - CreateTaxonomyRequest.prototype.taxonomy = null; - - /** - * Creates a new CreateTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CreateTaxonomyRequest} CreateTaxonomyRequest instance - */ - CreateTaxonomyRequest.create = function create(properties) { - return new CreateTaxonomyRequest(properties); - }; - - /** - * Encodes the specified CreateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTaxonomyRequest} message CreateTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTaxonomyRequest.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.taxonomy != null && Object.hasOwnProperty.call(message, "taxonomy")) - $root.google.cloud.datacatalog.v1.Taxonomy.encode(message.taxonomy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreateTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreateTaxonomyRequest} message CreateTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.CreateTaxonomyRequest} CreateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.CreateTaxonomyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.taxonomy = $root.google.cloud.datacatalog.v1.Taxonomy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CreateTaxonomyRequest} CreateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTaxonomyRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTaxonomyRequest.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.taxonomy != null && message.hasOwnProperty("taxonomy")) { - var error = $root.google.cloud.datacatalog.v1.Taxonomy.verify(message.taxonomy); - if (error) - return "taxonomy." + error; - } - return null; - }; - - /** - * Creates a CreateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CreateTaxonomyRequest} CreateTaxonomyRequest - */ - CreateTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CreateTaxonomyRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.CreateTaxonomyRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.taxonomy != null) { - if (typeof object.taxonomy !== "object") - throw TypeError(".google.cloud.datacatalog.v1.CreateTaxonomyRequest.taxonomy: object expected"); - message.taxonomy = $root.google.cloud.datacatalog.v1.Taxonomy.fromObject(object.taxonomy); - } - return message; - }; - - /** - * Creates a plain object from a CreateTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.CreateTaxonomyRequest} message CreateTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTaxonomyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.taxonomy = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) - object.taxonomy = $root.google.cloud.datacatalog.v1.Taxonomy.toObject(message.taxonomy, options); - return object; - }; - - /** - * Converts this CreateTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CreateTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CreateTaxonomyRequest"; - }; - - return CreateTaxonomyRequest; - })(); - - v1.DeleteTaxonomyRequest = (function() { - - /** - * Properties of a DeleteTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IDeleteTaxonomyRequest - * @property {string|null} [name] DeleteTaxonomyRequest name - */ - - /** - * Constructs a new DeleteTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DeleteTaxonomyRequest. - * @implements IDeleteTaxonomyRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IDeleteTaxonomyRequest=} [properties] Properties to set - */ - function DeleteTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTaxonomyRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @instance - */ - DeleteTaxonomyRequest.prototype.name = ""; - - /** - * Creates a new DeleteTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DeleteTaxonomyRequest} DeleteTaxonomyRequest instance - */ - DeleteTaxonomyRequest.create = function create(properties) { - return new DeleteTaxonomyRequest(properties); - }; - - /** - * Encodes the specified DeleteTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTaxonomyRequest} message DeleteTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTaxonomyRequest.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 DeleteTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeleteTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeleteTaxonomyRequest} message DeleteTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DeleteTaxonomyRequest} DeleteTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DeleteTaxonomyRequest(); - 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 DeleteTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DeleteTaxonomyRequest} DeleteTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTaxonomyRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTaxonomyRequest.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 DeleteTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DeleteTaxonomyRequest} DeleteTaxonomyRequest - */ - DeleteTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DeleteTaxonomyRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.DeleteTaxonomyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.DeleteTaxonomyRequest} message DeleteTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTaxonomyRequest.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 DeleteTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DeleteTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DeleteTaxonomyRequest"; - }; - - return DeleteTaxonomyRequest; - })(); - - v1.UpdateTaxonomyRequest = (function() { - - /** - * Properties of an UpdateTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IUpdateTaxonomyRequest - * @property {google.cloud.datacatalog.v1.ITaxonomy|null} [taxonomy] UpdateTaxonomyRequest taxonomy - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaxonomyRequest updateMask - */ - - /** - * Constructs a new UpdateTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an UpdateTaxonomyRequest. - * @implements IUpdateTaxonomyRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IUpdateTaxonomyRequest=} [properties] Properties to set - */ - function UpdateTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTaxonomyRequest taxonomy. - * @member {google.cloud.datacatalog.v1.ITaxonomy|null|undefined} taxonomy - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @instance - */ - UpdateTaxonomyRequest.prototype.taxonomy = null; - - /** - * UpdateTaxonomyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @instance - */ - UpdateTaxonomyRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UpdateTaxonomyRequest} UpdateTaxonomyRequest instance - */ - UpdateTaxonomyRequest.create = function create(properties) { - return new UpdateTaxonomyRequest(properties); - }; - - /** - * Encodes the specified UpdateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTaxonomyRequest} message UpdateTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTaxonomyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomy != null && Object.hasOwnProperty.call(message, "taxonomy")) - $root.google.cloud.datacatalog.v1.Taxonomy.encode(message.taxonomy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdateTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdateTaxonomyRequest} message UpdateTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UpdateTaxonomyRequest} UpdateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UpdateTaxonomyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.taxonomy = $root.google.cloud.datacatalog.v1.Taxonomy.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UpdateTaxonomyRequest} UpdateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTaxonomyRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTaxonomyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) { - var error = $root.google.cloud.datacatalog.v1.Taxonomy.verify(message.taxonomy); - if (error) - return "taxonomy." + 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 UpdateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UpdateTaxonomyRequest} UpdateTaxonomyRequest - */ - UpdateTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UpdateTaxonomyRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.UpdateTaxonomyRequest(); - if (object.taxonomy != null) { - if (typeof object.taxonomy !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateTaxonomyRequest.taxonomy: object expected"); - message.taxonomy = $root.google.cloud.datacatalog.v1.Taxonomy.fromObject(object.taxonomy); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdateTaxonomyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.UpdateTaxonomyRequest} message UpdateTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTaxonomyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.taxonomy = null; - object.updateMask = null; - } - if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) - object.taxonomy = $root.google.cloud.datacatalog.v1.Taxonomy.toObject(message.taxonomy, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UpdateTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UpdateTaxonomyRequest"; - }; - - return UpdateTaxonomyRequest; - })(); - - v1.ListTaxonomiesRequest = (function() { - - /** - * Properties of a ListTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IListTaxonomiesRequest - * @property {string|null} [parent] ListTaxonomiesRequest parent - * @property {number|null} [pageSize] ListTaxonomiesRequest pageSize - * @property {string|null} [pageToken] ListTaxonomiesRequest pageToken - */ - - /** - * Constructs a new ListTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListTaxonomiesRequest. - * @implements IListTaxonomiesRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IListTaxonomiesRequest=} [properties] Properties to set - */ - function ListTaxonomiesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTaxonomiesRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @instance - */ - ListTaxonomiesRequest.prototype.parent = ""; - - /** - * ListTaxonomiesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @instance - */ - ListTaxonomiesRequest.prototype.pageSize = 0; - - /** - * ListTaxonomiesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @instance - */ - ListTaxonomiesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListTaxonomiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.IListTaxonomiesRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListTaxonomiesRequest} ListTaxonomiesRequest instance - */ - ListTaxonomiesRequest.create = function create(properties) { - return new ListTaxonomiesRequest(properties); - }; - - /** - * Encodes the specified ListTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListTaxonomiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.IListTaxonomiesRequest} message ListTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTaxonomiesRequest.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 ListTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListTaxonomiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.IListTaxonomiesRequest} message ListTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTaxonomiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListTaxonomiesRequest} ListTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTaxonomiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListTaxonomiesRequest(); - 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 ListTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListTaxonomiesRequest} ListTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTaxonomiesRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTaxonomiesRequest.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 ListTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListTaxonomiesRequest} ListTaxonomiesRequest - */ - ListTaxonomiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListTaxonomiesRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListTaxonomiesRequest(); - 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 ListTaxonomiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.ListTaxonomiesRequest} message ListTaxonomiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTaxonomiesRequest.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 ListTaxonomiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @instance - * @returns {Object.} JSON object - */ - ListTaxonomiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTaxonomiesRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTaxonomiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListTaxonomiesRequest"; - }; - - return ListTaxonomiesRequest; - })(); - - v1.ListTaxonomiesResponse = (function() { - - /** - * Properties of a ListTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IListTaxonomiesResponse - * @property {Array.|null} [taxonomies] ListTaxonomiesResponse taxonomies - * @property {string|null} [nextPageToken] ListTaxonomiesResponse nextPageToken - */ - - /** - * Constructs a new ListTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListTaxonomiesResponse. - * @implements IListTaxonomiesResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IListTaxonomiesResponse=} [properties] Properties to set - */ - function ListTaxonomiesResponse(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTaxonomiesResponse taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @instance - */ - ListTaxonomiesResponse.prototype.taxonomies = $util.emptyArray; - - /** - * ListTaxonomiesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @instance - */ - ListTaxonomiesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTaxonomiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.IListTaxonomiesResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListTaxonomiesResponse} ListTaxonomiesResponse instance - */ - ListTaxonomiesResponse.create = function create(properties) { - return new ListTaxonomiesResponse(properties); - }; - - /** - * Encodes the specified ListTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListTaxonomiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.IListTaxonomiesResponse} message ListTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTaxonomiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - $root.google.cloud.datacatalog.v1.Taxonomy.encode(message.taxonomies[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 ListTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListTaxonomiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.IListTaxonomiesResponse} message ListTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTaxonomiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListTaxonomiesResponse} ListTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTaxonomiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListTaxonomiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push($root.google.cloud.datacatalog.v1.Taxonomy.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListTaxonomiesResponse} ListTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTaxonomiesResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTaxonomiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.Taxonomy.verify(message.taxonomies[i]); - if (error) - return "taxonomies." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListTaxonomiesResponse} ListTaxonomiesResponse - */ - ListTaxonomiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListTaxonomiesResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListTaxonomiesResponse(); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1.ListTaxonomiesResponse.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) { - if (typeof object.taxonomies[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ListTaxonomiesResponse.taxonomies: object expected"); - message.taxonomies[i] = $root.google.cloud.datacatalog.v1.Taxonomy.fromObject(object.taxonomies[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListTaxonomiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.ListTaxonomiesResponse} message ListTaxonomiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTaxonomiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = $root.google.cloud.datacatalog.v1.Taxonomy.toObject(message.taxonomies[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListTaxonomiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @instance - * @returns {Object.} JSON object - */ - ListTaxonomiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTaxonomiesResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListTaxonomiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTaxonomiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListTaxonomiesResponse"; - }; - - return ListTaxonomiesResponse; - })(); - - v1.GetTaxonomyRequest = (function() { - - /** - * Properties of a GetTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IGetTaxonomyRequest - * @property {string|null} [name] GetTaxonomyRequest name - */ - - /** - * Constructs a new GetTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a GetTaxonomyRequest. - * @implements IGetTaxonomyRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IGetTaxonomyRequest=} [properties] Properties to set - */ - function GetTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTaxonomyRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @instance - */ - GetTaxonomyRequest.prototype.name = ""; - - /** - * Creates a new GetTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.GetTaxonomyRequest} GetTaxonomyRequest instance - */ - GetTaxonomyRequest.create = function create(properties) { - return new GetTaxonomyRequest(properties); - }; - - /** - * Encodes the specified GetTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetTaxonomyRequest} message GetTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTaxonomyRequest.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 GetTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetTaxonomyRequest} message GetTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.GetTaxonomyRequest} GetTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.GetTaxonomyRequest(); - 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 GetTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.GetTaxonomyRequest} GetTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTaxonomyRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTaxonomyRequest.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 GetTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.GetTaxonomyRequest} GetTaxonomyRequest - */ - GetTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.GetTaxonomyRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.GetTaxonomyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.GetTaxonomyRequest} message GetTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTaxonomyRequest.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 GetTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - GetTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.GetTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.GetTaxonomyRequest"; - }; - - return GetTaxonomyRequest; - })(); - - v1.CreatePolicyTagRequest = (function() { - - /** - * Properties of a CreatePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface ICreatePolicyTagRequest - * @property {string|null} [parent] CreatePolicyTagRequest parent - * @property {google.cloud.datacatalog.v1.IPolicyTag|null} [policyTag] CreatePolicyTagRequest policyTag - */ - - /** - * Constructs a new CreatePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CreatePolicyTagRequest. - * @implements ICreatePolicyTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1.ICreatePolicyTagRequest=} [properties] Properties to set - */ - function CreatePolicyTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreatePolicyTagRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @instance - */ - CreatePolicyTagRequest.prototype.parent = ""; - - /** - * CreatePolicyTagRequest policyTag. - * @member {google.cloud.datacatalog.v1.IPolicyTag|null|undefined} policyTag - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @instance - */ - CreatePolicyTagRequest.prototype.policyTag = null; - - /** - * Creates a new CreatePolicyTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreatePolicyTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CreatePolicyTagRequest} CreatePolicyTagRequest instance - */ - CreatePolicyTagRequest.create = function create(properties) { - return new CreatePolicyTagRequest(properties); - }; - - /** - * Encodes the specified CreatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.CreatePolicyTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreatePolicyTagRequest} message CreatePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePolicyTagRequest.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.policyTag != null && Object.hasOwnProperty.call(message, "policyTag")) - $root.google.cloud.datacatalog.v1.PolicyTag.encode(message.policyTag, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CreatePolicyTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.ICreatePolicyTagRequest} message CreatePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreatePolicyTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.CreatePolicyTagRequest} CreatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePolicyTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.CreatePolicyTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.policyTag = $root.google.cloud.datacatalog.v1.PolicyTag.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreatePolicyTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CreatePolicyTagRequest} CreatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreatePolicyTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreatePolicyTagRequest.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.policyTag != null && message.hasOwnProperty("policyTag")) { - var error = $root.google.cloud.datacatalog.v1.PolicyTag.verify(message.policyTag); - if (error) - return "policyTag." + error; - } - return null; - }; - - /** - * Creates a CreatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CreatePolicyTagRequest} CreatePolicyTagRequest - */ - CreatePolicyTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CreatePolicyTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.CreatePolicyTagRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.policyTag != null) { - if (typeof object.policyTag !== "object") - throw TypeError(".google.cloud.datacatalog.v1.CreatePolicyTagRequest.policyTag: object expected"); - message.policyTag = $root.google.cloud.datacatalog.v1.PolicyTag.fromObject(object.policyTag); - } - return message; - }; - - /** - * Creates a plain object from a CreatePolicyTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.CreatePolicyTagRequest} message CreatePolicyTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreatePolicyTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.policyTag = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.policyTag != null && message.hasOwnProperty("policyTag")) - object.policyTag = $root.google.cloud.datacatalog.v1.PolicyTag.toObject(message.policyTag, options); - return object; - }; - - /** - * Converts this CreatePolicyTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @instance - * @returns {Object.} JSON object - */ - CreatePolicyTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreatePolicyTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CreatePolicyTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreatePolicyTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CreatePolicyTagRequest"; - }; - - return CreatePolicyTagRequest; - })(); - - v1.DeletePolicyTagRequest = (function() { - - /** - * Properties of a DeletePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IDeletePolicyTagRequest - * @property {string|null} [name] DeletePolicyTagRequest name - */ - - /** - * Constructs a new DeletePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a DeletePolicyTagRequest. - * @implements IDeletePolicyTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IDeletePolicyTagRequest=} [properties] Properties to set - */ - function DeletePolicyTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeletePolicyTagRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @instance - */ - DeletePolicyTagRequest.prototype.name = ""; - - /** - * Creates a new DeletePolicyTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeletePolicyTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.DeletePolicyTagRequest} DeletePolicyTagRequest instance - */ - DeletePolicyTagRequest.create = function create(properties) { - return new DeletePolicyTagRequest(properties); - }; - - /** - * Encodes the specified DeletePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.DeletePolicyTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeletePolicyTagRequest} message DeletePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePolicyTagRequest.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 DeletePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.DeletePolicyTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IDeletePolicyTagRequest} message DeletePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeletePolicyTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.DeletePolicyTagRequest} DeletePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePolicyTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.DeletePolicyTagRequest(); - 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 DeletePolicyTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.DeletePolicyTagRequest} DeletePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeletePolicyTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePolicyTagRequest.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 DeletePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.DeletePolicyTagRequest} DeletePolicyTagRequest - */ - DeletePolicyTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.DeletePolicyTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.DeletePolicyTagRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeletePolicyTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.DeletePolicyTagRequest} message DeletePolicyTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePolicyTagRequest.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 DeletePolicyTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePolicyTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeletePolicyTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.DeletePolicyTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeletePolicyTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.DeletePolicyTagRequest"; - }; - - return DeletePolicyTagRequest; - })(); - - v1.UpdatePolicyTagRequest = (function() { - - /** - * Properties of an UpdatePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IUpdatePolicyTagRequest - * @property {google.cloud.datacatalog.v1.IPolicyTag|null} [policyTag] UpdatePolicyTagRequest policyTag - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePolicyTagRequest updateMask - */ - - /** - * Constructs a new UpdatePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an UpdatePolicyTagRequest. - * @implements IUpdatePolicyTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IUpdatePolicyTagRequest=} [properties] Properties to set - */ - function UpdatePolicyTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdatePolicyTagRequest policyTag. - * @member {google.cloud.datacatalog.v1.IPolicyTag|null|undefined} policyTag - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @instance - */ - UpdatePolicyTagRequest.prototype.policyTag = null; - - /** - * UpdatePolicyTagRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @instance - */ - UpdatePolicyTagRequest.prototype.updateMask = null; - - /** - * Creates a new UpdatePolicyTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdatePolicyTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.UpdatePolicyTagRequest} UpdatePolicyTagRequest instance - */ - UpdatePolicyTagRequest.create = function create(properties) { - return new UpdatePolicyTagRequest(properties); - }; - - /** - * Encodes the specified UpdatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.UpdatePolicyTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdatePolicyTagRequest} message UpdatePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePolicyTagRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.policyTag != null && Object.hasOwnProperty.call(message, "policyTag")) - $root.google.cloud.datacatalog.v1.PolicyTag.encode(message.policyTag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.UpdatePolicyTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IUpdatePolicyTagRequest} message UpdatePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.UpdatePolicyTagRequest} UpdatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePolicyTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.UpdatePolicyTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.policyTag = $root.google.cloud.datacatalog.v1.PolicyTag.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.UpdatePolicyTagRequest} UpdatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdatePolicyTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdatePolicyTagRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.policyTag != null && message.hasOwnProperty("policyTag")) { - var error = $root.google.cloud.datacatalog.v1.PolicyTag.verify(message.policyTag); - if (error) - return "policyTag." + 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 UpdatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.UpdatePolicyTagRequest} UpdatePolicyTagRequest - */ - UpdatePolicyTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.UpdatePolicyTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.UpdatePolicyTagRequest(); - if (object.policyTag != null) { - if (typeof object.policyTag !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdatePolicyTagRequest.policyTag: object expected"); - message.policyTag = $root.google.cloud.datacatalog.v1.PolicyTag.fromObject(object.policyTag); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1.UpdatePolicyTagRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdatePolicyTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.UpdatePolicyTagRequest} message UpdatePolicyTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdatePolicyTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.policyTag = null; - object.updateMask = null; - } - if (message.policyTag != null && message.hasOwnProperty("policyTag")) - object.policyTag = $root.google.cloud.datacatalog.v1.PolicyTag.toObject(message.policyTag, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdatePolicyTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @instance - * @returns {Object.} JSON object - */ - UpdatePolicyTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdatePolicyTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.UpdatePolicyTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdatePolicyTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.UpdatePolicyTagRequest"; - }; - - return UpdatePolicyTagRequest; - })(); - - v1.ListPolicyTagsRequest = (function() { - - /** - * Properties of a ListPolicyTagsRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IListPolicyTagsRequest - * @property {string|null} [parent] ListPolicyTagsRequest parent - * @property {number|null} [pageSize] ListPolicyTagsRequest pageSize - * @property {string|null} [pageToken] ListPolicyTagsRequest pageToken - */ - - /** - * Constructs a new ListPolicyTagsRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListPolicyTagsRequest. - * @implements IListPolicyTagsRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IListPolicyTagsRequest=} [properties] Properties to set - */ - function ListPolicyTagsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPolicyTagsRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @instance - */ - ListPolicyTagsRequest.prototype.parent = ""; - - /** - * ListPolicyTagsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @instance - */ - ListPolicyTagsRequest.prototype.pageSize = 0; - - /** - * ListPolicyTagsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @instance - */ - ListPolicyTagsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListPolicyTagsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.IListPolicyTagsRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListPolicyTagsRequest} ListPolicyTagsRequest instance - */ - ListPolicyTagsRequest.create = function create(properties) { - return new ListPolicyTagsRequest(properties); - }; - - /** - * Encodes the specified ListPolicyTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ListPolicyTagsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.IListPolicyTagsRequest} message ListPolicyTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPolicyTagsRequest.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 ListPolicyTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListPolicyTagsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.IListPolicyTagsRequest} message ListPolicyTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPolicyTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPolicyTagsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListPolicyTagsRequest} ListPolicyTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPolicyTagsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListPolicyTagsRequest(); - 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 ListPolicyTagsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListPolicyTagsRequest} ListPolicyTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPolicyTagsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPolicyTagsRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPolicyTagsRequest.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 ListPolicyTagsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListPolicyTagsRequest} ListPolicyTagsRequest - */ - ListPolicyTagsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListPolicyTagsRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListPolicyTagsRequest(); - 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 ListPolicyTagsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @static - * @param {google.cloud.datacatalog.v1.ListPolicyTagsRequest} message ListPolicyTagsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPolicyTagsRequest.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 ListPolicyTagsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPolicyTagsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPolicyTagsRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPolicyTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListPolicyTagsRequest"; - }; - - return ListPolicyTagsRequest; - })(); - - v1.ListPolicyTagsResponse = (function() { - - /** - * Properties of a ListPolicyTagsResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IListPolicyTagsResponse - * @property {Array.|null} [policyTags] ListPolicyTagsResponse policyTags - * @property {string|null} [nextPageToken] ListPolicyTagsResponse nextPageToken - */ - - /** - * Constructs a new ListPolicyTagsResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ListPolicyTagsResponse. - * @implements IListPolicyTagsResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IListPolicyTagsResponse=} [properties] Properties to set - */ - function ListPolicyTagsResponse(properties) { - this.policyTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPolicyTagsResponse policyTags. - * @member {Array.} policyTags - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @instance - */ - ListPolicyTagsResponse.prototype.policyTags = $util.emptyArray; - - /** - * ListPolicyTagsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @instance - */ - ListPolicyTagsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListPolicyTagsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.IListPolicyTagsResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ListPolicyTagsResponse} ListPolicyTagsResponse instance - */ - ListPolicyTagsResponse.create = function create(properties) { - return new ListPolicyTagsResponse(properties); - }; - - /** - * Encodes the specified ListPolicyTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ListPolicyTagsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.IListPolicyTagsResponse} message ListPolicyTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPolicyTagsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.policyTags != null && message.policyTags.length) - for (var i = 0; i < message.policyTags.length; ++i) - $root.google.cloud.datacatalog.v1.PolicyTag.encode(message.policyTags[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 ListPolicyTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ListPolicyTagsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.IListPolicyTagsResponse} message ListPolicyTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPolicyTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPolicyTagsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ListPolicyTagsResponse} ListPolicyTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPolicyTagsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ListPolicyTagsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.policyTags && message.policyTags.length)) - message.policyTags = []; - message.policyTags.push($root.google.cloud.datacatalog.v1.PolicyTag.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPolicyTagsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ListPolicyTagsResponse} ListPolicyTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPolicyTagsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPolicyTagsResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPolicyTagsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.policyTags != null && message.hasOwnProperty("policyTags")) { - if (!Array.isArray(message.policyTags)) - return "policyTags: array expected"; - for (var i = 0; i < message.policyTags.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.PolicyTag.verify(message.policyTags[i]); - if (error) - return "policyTags." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListPolicyTagsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ListPolicyTagsResponse} ListPolicyTagsResponse - */ - ListPolicyTagsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ListPolicyTagsResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.ListPolicyTagsResponse(); - if (object.policyTags) { - if (!Array.isArray(object.policyTags)) - throw TypeError(".google.cloud.datacatalog.v1.ListPolicyTagsResponse.policyTags: array expected"); - message.policyTags = []; - for (var i = 0; i < object.policyTags.length; ++i) { - if (typeof object.policyTags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ListPolicyTagsResponse.policyTags: object expected"); - message.policyTags[i] = $root.google.cloud.datacatalog.v1.PolicyTag.fromObject(object.policyTags[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListPolicyTagsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @static - * @param {google.cloud.datacatalog.v1.ListPolicyTagsResponse} message ListPolicyTagsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPolicyTagsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.policyTags = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.policyTags && message.policyTags.length) { - object.policyTags = []; - for (var j = 0; j < message.policyTags.length; ++j) - object.policyTags[j] = $root.google.cloud.datacatalog.v1.PolicyTag.toObject(message.policyTags[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListPolicyTagsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPolicyTagsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPolicyTagsResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ListPolicyTagsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPolicyTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ListPolicyTagsResponse"; - }; - - return ListPolicyTagsResponse; - })(); - - v1.GetPolicyTagRequest = (function() { - - /** - * Properties of a GetPolicyTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IGetPolicyTagRequest - * @property {string|null} [name] GetPolicyTagRequest name - */ - - /** - * Constructs a new GetPolicyTagRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a GetPolicyTagRequest. - * @implements IGetPolicyTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IGetPolicyTagRequest=} [properties] Properties to set - */ - function GetPolicyTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPolicyTagRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @instance - */ - GetPolicyTagRequest.prototype.name = ""; - - /** - * Creates a new GetPolicyTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetPolicyTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.GetPolicyTagRequest} GetPolicyTagRequest instance - */ - GetPolicyTagRequest.create = function create(properties) { - return new GetPolicyTagRequest(properties); - }; - - /** - * Encodes the specified GetPolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.GetPolicyTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetPolicyTagRequest} message GetPolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyTagRequest.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 GetPolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.GetPolicyTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.IGetPolicyTagRequest} message GetPolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPolicyTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.GetPolicyTagRequest} GetPolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.GetPolicyTagRequest(); - 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 GetPolicyTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.GetPolicyTagRequest} GetPolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPolicyTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPolicyTagRequest.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 GetPolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.GetPolicyTagRequest} GetPolicyTagRequest - */ - GetPolicyTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.GetPolicyTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.GetPolicyTagRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetPolicyTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1.GetPolicyTagRequest} message GetPolicyTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPolicyTagRequest.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 GetPolicyTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @instance - * @returns {Object.} JSON object - */ - GetPolicyTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPolicyTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.GetPolicyTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPolicyTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.GetPolicyTagRequest"; - }; - - return GetPolicyTagRequest; - })(); - - v1.PolicyTagManagerSerialization = (function() { - - /** - * Constructs a new PolicyTagManagerSerialization service. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a PolicyTagManagerSerialization - * @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 PolicyTagManagerSerialization(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (PolicyTagManagerSerialization.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PolicyTagManagerSerialization; - - /** - * Creates new PolicyTagManagerSerialization service using the specified rpc implementation. - * @function create - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @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 {PolicyTagManagerSerialization} RPC service. Useful where requests and/or responses are streamed. - */ - PolicyTagManagerSerialization.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManagerSerialization|replaceTaxonomy}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @typedef ReplaceTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.Taxonomy} [response] Taxonomy - */ - - /** - * Calls ReplaceTaxonomy. - * @function replaceTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1.IReplaceTaxonomyRequest} request ReplaceTaxonomyRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ReplaceTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManagerSerialization.prototype.replaceTaxonomy = function replaceTaxonomy(request, callback) { - return this.rpcCall(replaceTaxonomy, $root.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest, $root.google.cloud.datacatalog.v1.Taxonomy, request, callback); - }, "name", { value: "ReplaceTaxonomy" }); - - /** - * Calls ReplaceTaxonomy. - * @function replaceTaxonomy - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1.IReplaceTaxonomyRequest} request ReplaceTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManagerSerialization|importTaxonomies}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @typedef ImportTaxonomiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.ImportTaxonomiesResponse} [response] ImportTaxonomiesResponse - */ - - /** - * Calls ImportTaxonomies. - * @function importTaxonomies - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesRequest} request ImportTaxonomiesRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomiesCallback} callback Node-style callback called with the error, if any, and ImportTaxonomiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManagerSerialization.prototype.importTaxonomies = function importTaxonomies(request, callback) { - return this.rpcCall(importTaxonomies, $root.google.cloud.datacatalog.v1.ImportTaxonomiesRequest, $root.google.cloud.datacatalog.v1.ImportTaxonomiesResponse, request, callback); - }, "name", { value: "ImportTaxonomies" }); - - /** - * Calls ImportTaxonomies. - * @function importTaxonomies - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesRequest} request ImportTaxonomiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1.PolicyTagManagerSerialization|exportTaxonomies}. - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @typedef ExportTaxonomiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1.ExportTaxonomiesResponse} [response] ExportTaxonomiesResponse - */ - - /** - * Calls ExportTaxonomies. - * @function exportTaxonomies - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesRequest} request ExportTaxonomiesRequest message or plain object - * @param {google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomiesCallback} callback Node-style callback called with the error, if any, and ExportTaxonomiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManagerSerialization.prototype.exportTaxonomies = function exportTaxonomies(request, callback) { - return this.rpcCall(exportTaxonomies, $root.google.cloud.datacatalog.v1.ExportTaxonomiesRequest, $root.google.cloud.datacatalog.v1.ExportTaxonomiesResponse, request, callback); - }, "name", { value: "ExportTaxonomies" }); - - /** - * Calls ExportTaxonomies. - * @function exportTaxonomies - * @memberof google.cloud.datacatalog.v1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesRequest} request ExportTaxonomiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return PolicyTagManagerSerialization; - })(); - - v1.SerializedTaxonomy = (function() { - - /** - * Properties of a SerializedTaxonomy. - * @memberof google.cloud.datacatalog.v1 - * @interface ISerializedTaxonomy - * @property {string|null} [displayName] SerializedTaxonomy displayName - * @property {string|null} [description] SerializedTaxonomy description - * @property {Array.|null} [policyTags] SerializedTaxonomy policyTags - * @property {Array.|null} [activatedPolicyTypes] SerializedTaxonomy activatedPolicyTypes - */ - - /** - * Constructs a new SerializedTaxonomy. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a SerializedTaxonomy. - * @implements ISerializedTaxonomy - * @constructor - * @param {google.cloud.datacatalog.v1.ISerializedTaxonomy=} [properties] Properties to set - */ - function SerializedTaxonomy(properties) { - this.policyTags = []; - this.activatedPolicyTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SerializedTaxonomy displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @instance - */ - SerializedTaxonomy.prototype.displayName = ""; - - /** - * SerializedTaxonomy description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @instance - */ - SerializedTaxonomy.prototype.description = ""; - - /** - * SerializedTaxonomy policyTags. - * @member {Array.} policyTags - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @instance - */ - SerializedTaxonomy.prototype.policyTags = $util.emptyArray; - - /** - * SerializedTaxonomy activatedPolicyTypes. - * @member {Array.} activatedPolicyTypes - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @instance - */ - SerializedTaxonomy.prototype.activatedPolicyTypes = $util.emptyArray; - - /** - * Creates a new SerializedTaxonomy instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @static - * @param {google.cloud.datacatalog.v1.ISerializedTaxonomy=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.SerializedTaxonomy} SerializedTaxonomy instance - */ - SerializedTaxonomy.create = function create(properties) { - return new SerializedTaxonomy(properties); - }; - - /** - * Encodes the specified SerializedTaxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1.SerializedTaxonomy.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @static - * @param {google.cloud.datacatalog.v1.ISerializedTaxonomy} message SerializedTaxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SerializedTaxonomy.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.policyTags != null && message.policyTags.length) - for (var i = 0; i < message.policyTags.length; ++i) - $root.google.cloud.datacatalog.v1.SerializedPolicyTag.encode(message.policyTags[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.activatedPolicyTypes != null && message.activatedPolicyTypes.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.activatedPolicyTypes.length; ++i) - writer.int32(message.activatedPolicyTypes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified SerializedTaxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SerializedTaxonomy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @static - * @param {google.cloud.datacatalog.v1.ISerializedTaxonomy} message SerializedTaxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SerializedTaxonomy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SerializedTaxonomy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.SerializedTaxonomy} SerializedTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SerializedTaxonomy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.SerializedTaxonomy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - if (!(message.policyTags && message.policyTags.length)) - message.policyTags = []; - message.policyTags.push($root.google.cloud.datacatalog.v1.SerializedPolicyTag.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.activatedPolicyTypes && message.activatedPolicyTypes.length)) - message.activatedPolicyTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.activatedPolicyTypes.push(reader.int32()); - } else - message.activatedPolicyTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SerializedTaxonomy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.SerializedTaxonomy} SerializedTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SerializedTaxonomy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SerializedTaxonomy message. - * @function verify - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SerializedTaxonomy.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.policyTags != null && message.hasOwnProperty("policyTags")) { - if (!Array.isArray(message.policyTags)) - return "policyTags: array expected"; - for (var i = 0; i < message.policyTags.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.SerializedPolicyTag.verify(message.policyTags[i]); - if (error) - return "policyTags." + error; - } - } - if (message.activatedPolicyTypes != null && message.hasOwnProperty("activatedPolicyTypes")) { - if (!Array.isArray(message.activatedPolicyTypes)) - return "activatedPolicyTypes: array expected"; - for (var i = 0; i < message.activatedPolicyTypes.length; ++i) - switch (message.activatedPolicyTypes[i]) { - default: - return "activatedPolicyTypes: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a SerializedTaxonomy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.SerializedTaxonomy} SerializedTaxonomy - */ - SerializedTaxonomy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.SerializedTaxonomy) - return object; - var message = new $root.google.cloud.datacatalog.v1.SerializedTaxonomy(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.policyTags) { - if (!Array.isArray(object.policyTags)) - throw TypeError(".google.cloud.datacatalog.v1.SerializedTaxonomy.policyTags: array expected"); - message.policyTags = []; - for (var i = 0; i < object.policyTags.length; ++i) { - if (typeof object.policyTags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.SerializedTaxonomy.policyTags: object expected"); - message.policyTags[i] = $root.google.cloud.datacatalog.v1.SerializedPolicyTag.fromObject(object.policyTags[i]); - } - } - if (object.activatedPolicyTypes) { - if (!Array.isArray(object.activatedPolicyTypes)) - throw TypeError(".google.cloud.datacatalog.v1.SerializedTaxonomy.activatedPolicyTypes: array expected"); - message.activatedPolicyTypes = []; - for (var i = 0; i < object.activatedPolicyTypes.length; ++i) - switch (object.activatedPolicyTypes[i]) { - default: - if (typeof object.activatedPolicyTypes[i] === "number") { - message.activatedPolicyTypes[i] = object.activatedPolicyTypes[i]; - break; - } - case "POLICY_TYPE_UNSPECIFIED": - case 0: - message.activatedPolicyTypes[i] = 0; - break; - case "FINE_GRAINED_ACCESS_CONTROL": - case 1: - message.activatedPolicyTypes[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a SerializedTaxonomy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @static - * @param {google.cloud.datacatalog.v1.SerializedTaxonomy} message SerializedTaxonomy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SerializedTaxonomy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.policyTags = []; - object.activatedPolicyTypes = []; - } - if (options.defaults) { - object.displayName = ""; - object.description = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.policyTags && message.policyTags.length) { - object.policyTags = []; - for (var j = 0; j < message.policyTags.length; ++j) - object.policyTags[j] = $root.google.cloud.datacatalog.v1.SerializedPolicyTag.toObject(message.policyTags[j], options); - } - if (message.activatedPolicyTypes && message.activatedPolicyTypes.length) { - object.activatedPolicyTypes = []; - for (var j = 0; j < message.activatedPolicyTypes.length; ++j) - object.activatedPolicyTypes[j] = options.enums === String ? $root.google.cloud.datacatalog.v1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] === undefined ? message.activatedPolicyTypes[j] : $root.google.cloud.datacatalog.v1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] : message.activatedPolicyTypes[j]; - } - return object; - }; - - /** - * Converts this SerializedTaxonomy to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @instance - * @returns {Object.} JSON object - */ - SerializedTaxonomy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SerializedTaxonomy - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.SerializedTaxonomy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SerializedTaxonomy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.SerializedTaxonomy"; - }; - - return SerializedTaxonomy; - })(); - - v1.SerializedPolicyTag = (function() { - - /** - * Properties of a SerializedPolicyTag. - * @memberof google.cloud.datacatalog.v1 - * @interface ISerializedPolicyTag - * @property {string|null} [policyTag] SerializedPolicyTag policyTag - * @property {string|null} [displayName] SerializedPolicyTag displayName - * @property {string|null} [description] SerializedPolicyTag description - * @property {Array.|null} [childPolicyTags] SerializedPolicyTag childPolicyTags - */ - - /** - * Constructs a new SerializedPolicyTag. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a SerializedPolicyTag. - * @implements ISerializedPolicyTag - * @constructor - * @param {google.cloud.datacatalog.v1.ISerializedPolicyTag=} [properties] Properties to set - */ - function SerializedPolicyTag(properties) { - this.childPolicyTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SerializedPolicyTag policyTag. - * @member {string} policyTag - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @instance - */ - SerializedPolicyTag.prototype.policyTag = ""; - - /** - * SerializedPolicyTag displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @instance - */ - SerializedPolicyTag.prototype.displayName = ""; - - /** - * SerializedPolicyTag description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @instance - */ - SerializedPolicyTag.prototype.description = ""; - - /** - * SerializedPolicyTag childPolicyTags. - * @member {Array.} childPolicyTags - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @instance - */ - SerializedPolicyTag.prototype.childPolicyTags = $util.emptyArray; - - /** - * Creates a new SerializedPolicyTag instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @static - * @param {google.cloud.datacatalog.v1.ISerializedPolicyTag=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.SerializedPolicyTag} SerializedPolicyTag instance - */ - SerializedPolicyTag.create = function create(properties) { - return new SerializedPolicyTag(properties); - }; - - /** - * Encodes the specified SerializedPolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1.SerializedPolicyTag.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @static - * @param {google.cloud.datacatalog.v1.ISerializedPolicyTag} message SerializedPolicyTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SerializedPolicyTag.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.policyTag != null && Object.hasOwnProperty.call(message, "policyTag")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.policyTag); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.childPolicyTags != null && message.childPolicyTags.length) - for (var i = 0; i < message.childPolicyTags.length; ++i) - $root.google.cloud.datacatalog.v1.SerializedPolicyTag.encode(message.childPolicyTags[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SerializedPolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.SerializedPolicyTag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @static - * @param {google.cloud.datacatalog.v1.ISerializedPolicyTag} message SerializedPolicyTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SerializedPolicyTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SerializedPolicyTag message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.SerializedPolicyTag} SerializedPolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SerializedPolicyTag.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.SerializedPolicyTag(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.policyTag = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - if (!(message.childPolicyTags && message.childPolicyTags.length)) - message.childPolicyTags = []; - message.childPolicyTags.push($root.google.cloud.datacatalog.v1.SerializedPolicyTag.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SerializedPolicyTag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.SerializedPolicyTag} SerializedPolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SerializedPolicyTag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SerializedPolicyTag message. - * @function verify - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SerializedPolicyTag.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.policyTag != null && message.hasOwnProperty("policyTag")) - if (!$util.isString(message.policyTag)) - return "policyTag: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.childPolicyTags != null && message.hasOwnProperty("childPolicyTags")) { - if (!Array.isArray(message.childPolicyTags)) - return "childPolicyTags: array expected"; - for (var i = 0; i < message.childPolicyTags.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.SerializedPolicyTag.verify(message.childPolicyTags[i]); - if (error) - return "childPolicyTags." + error; - } - } - return null; - }; - - /** - * Creates a SerializedPolicyTag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.SerializedPolicyTag} SerializedPolicyTag - */ - SerializedPolicyTag.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.SerializedPolicyTag) - return object; - var message = new $root.google.cloud.datacatalog.v1.SerializedPolicyTag(); - if (object.policyTag != null) - message.policyTag = String(object.policyTag); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.childPolicyTags) { - if (!Array.isArray(object.childPolicyTags)) - throw TypeError(".google.cloud.datacatalog.v1.SerializedPolicyTag.childPolicyTags: array expected"); - message.childPolicyTags = []; - for (var i = 0; i < object.childPolicyTags.length; ++i) { - if (typeof object.childPolicyTags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.SerializedPolicyTag.childPolicyTags: object expected"); - message.childPolicyTags[i] = $root.google.cloud.datacatalog.v1.SerializedPolicyTag.fromObject(object.childPolicyTags[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SerializedPolicyTag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @static - * @param {google.cloud.datacatalog.v1.SerializedPolicyTag} message SerializedPolicyTag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SerializedPolicyTag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.childPolicyTags = []; - if (options.defaults) { - object.policyTag = ""; - object.displayName = ""; - object.description = ""; - } - if (message.policyTag != null && message.hasOwnProperty("policyTag")) - object.policyTag = message.policyTag; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.childPolicyTags && message.childPolicyTags.length) { - object.childPolicyTags = []; - for (var j = 0; j < message.childPolicyTags.length; ++j) - object.childPolicyTags[j] = $root.google.cloud.datacatalog.v1.SerializedPolicyTag.toObject(message.childPolicyTags[j], options); - } - return object; - }; - - /** - * Converts this SerializedPolicyTag to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @instance - * @returns {Object.} JSON object - */ - SerializedPolicyTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SerializedPolicyTag - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.SerializedPolicyTag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SerializedPolicyTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.SerializedPolicyTag"; - }; - - return SerializedPolicyTag; - })(); - - v1.ReplaceTaxonomyRequest = (function() { - - /** - * Properties of a ReplaceTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IReplaceTaxonomyRequest - * @property {string|null} [name] ReplaceTaxonomyRequest name - * @property {google.cloud.datacatalog.v1.ISerializedTaxonomy|null} [serializedTaxonomy] ReplaceTaxonomyRequest serializedTaxonomy - */ - - /** - * Constructs a new ReplaceTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a ReplaceTaxonomyRequest. - * @implements IReplaceTaxonomyRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IReplaceTaxonomyRequest=} [properties] Properties to set - */ - function ReplaceTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReplaceTaxonomyRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @instance - */ - ReplaceTaxonomyRequest.prototype.name = ""; - - /** - * ReplaceTaxonomyRequest serializedTaxonomy. - * @member {google.cloud.datacatalog.v1.ISerializedTaxonomy|null|undefined} serializedTaxonomy - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @instance - */ - ReplaceTaxonomyRequest.prototype.serializedTaxonomy = null; - - /** - * Creates a new ReplaceTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IReplaceTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ReplaceTaxonomyRequest} ReplaceTaxonomyRequest instance - */ - ReplaceTaxonomyRequest.create = function create(properties) { - return new ReplaceTaxonomyRequest(properties); - }; - - /** - * Encodes the specified ReplaceTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ReplaceTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IReplaceTaxonomyRequest} message ReplaceTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplaceTaxonomyRequest.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.serializedTaxonomy != null && Object.hasOwnProperty.call(message, "serializedTaxonomy")) - $root.google.cloud.datacatalog.v1.SerializedTaxonomy.encode(message.serializedTaxonomy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReplaceTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ReplaceTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.IReplaceTaxonomyRequest} message ReplaceTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReplaceTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReplaceTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ReplaceTaxonomyRequest} ReplaceTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplaceTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.serializedTaxonomy = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReplaceTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ReplaceTaxonomyRequest} ReplaceTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReplaceTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReplaceTaxonomyRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReplaceTaxonomyRequest.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.serializedTaxonomy != null && message.hasOwnProperty("serializedTaxonomy")) { - var error = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.verify(message.serializedTaxonomy); - if (error) - return "serializedTaxonomy." + error; - } - return null; - }; - - /** - * Creates a ReplaceTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ReplaceTaxonomyRequest} ReplaceTaxonomyRequest - */ - ReplaceTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.serializedTaxonomy != null) { - if (typeof object.serializedTaxonomy !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ReplaceTaxonomyRequest.serializedTaxonomy: object expected"); - message.serializedTaxonomy = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.fromObject(object.serializedTaxonomy); - } - return message; - }; - - /** - * Creates a plain object from a ReplaceTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1.ReplaceTaxonomyRequest} message ReplaceTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReplaceTaxonomyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.serializedTaxonomy = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.serializedTaxonomy != null && message.hasOwnProperty("serializedTaxonomy")) - object.serializedTaxonomy = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.toObject(message.serializedTaxonomy, options); - return object; - }; - - /** - * Converts this ReplaceTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - ReplaceTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReplaceTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ReplaceTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReplaceTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ReplaceTaxonomyRequest"; - }; - - return ReplaceTaxonomyRequest; - })(); - - v1.ImportTaxonomiesRequest = (function() { - - /** - * Properties of an ImportTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IImportTaxonomiesRequest - * @property {string|null} [parent] ImportTaxonomiesRequest parent - * @property {google.cloud.datacatalog.v1.IInlineSource|null} [inlineSource] ImportTaxonomiesRequest inlineSource - * @property {google.cloud.datacatalog.v1.ICrossRegionalSource|null} [crossRegionalSource] ImportTaxonomiesRequest crossRegionalSource - */ - - /** - * Constructs a new ImportTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an ImportTaxonomiesRequest. - * @implements IImportTaxonomiesRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesRequest=} [properties] Properties to set - */ - function ImportTaxonomiesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportTaxonomiesRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @instance - */ - ImportTaxonomiesRequest.prototype.parent = ""; - - /** - * ImportTaxonomiesRequest inlineSource. - * @member {google.cloud.datacatalog.v1.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @instance - */ - ImportTaxonomiesRequest.prototype.inlineSource = null; - - /** - * ImportTaxonomiesRequest crossRegionalSource. - * @member {google.cloud.datacatalog.v1.ICrossRegionalSource|null|undefined} crossRegionalSource - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @instance - */ - ImportTaxonomiesRequest.prototype.crossRegionalSource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportTaxonomiesRequest source. - * @member {"inlineSource"|"crossRegionalSource"|undefined} source - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @instance - */ - Object.defineProperty(ImportTaxonomiesRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource", "crossRegionalSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ImportTaxonomiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ImportTaxonomiesRequest} ImportTaxonomiesRequest instance - */ - ImportTaxonomiesRequest.create = function create(properties) { - return new ImportTaxonomiesRequest(properties); - }; - - /** - * Encodes the specified ImportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportTaxonomiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesRequest} message ImportTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportTaxonomiesRequest.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.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.datacatalog.v1.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.crossRegionalSource != null && Object.hasOwnProperty.call(message, "crossRegionalSource")) - $root.google.cloud.datacatalog.v1.CrossRegionalSource.encode(message.crossRegionalSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportTaxonomiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesRequest} message ImportTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ImportTaxonomiesRequest} ImportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportTaxonomiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ImportTaxonomiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.inlineSource = $root.google.cloud.datacatalog.v1.InlineSource.decode(reader, reader.uint32()); - break; - } - case 3: { - message.crossRegionalSource = $root.google.cloud.datacatalog.v1.CrossRegionalSource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ImportTaxonomiesRequest} ImportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportTaxonomiesRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportTaxonomiesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - properties.source = 1; - { - var error = $root.google.cloud.datacatalog.v1.InlineSource.verify(message.inlineSource); - if (error) - return "inlineSource." + error; - } - } - if (message.crossRegionalSource != null && message.hasOwnProperty("crossRegionalSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.datacatalog.v1.CrossRegionalSource.verify(message.crossRegionalSource); - if (error) - return "crossRegionalSource." + error; - } - } - return null; - }; - - /** - * Creates an ImportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ImportTaxonomiesRequest} ImportTaxonomiesRequest - */ - ImportTaxonomiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ImportTaxonomiesRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ImportTaxonomiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.inlineSource != null) { - if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ImportTaxonomiesRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.datacatalog.v1.InlineSource.fromObject(object.inlineSource); - } - if (object.crossRegionalSource != null) { - if (typeof object.crossRegionalSource !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ImportTaxonomiesRequest.crossRegionalSource: object expected"); - message.crossRegionalSource = $root.google.cloud.datacatalog.v1.CrossRegionalSource.fromObject(object.crossRegionalSource); - } - return message; - }; - - /** - * Creates a plain object from an ImportTaxonomiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.ImportTaxonomiesRequest} message ImportTaxonomiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportTaxonomiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.datacatalog.v1.InlineSource.toObject(message.inlineSource, options); - if (options.oneofs) - object.source = "inlineSource"; - } - if (message.crossRegionalSource != null && message.hasOwnProperty("crossRegionalSource")) { - object.crossRegionalSource = $root.google.cloud.datacatalog.v1.CrossRegionalSource.toObject(message.crossRegionalSource, options); - if (options.oneofs) - object.source = "crossRegionalSource"; - } - return object; - }; - - /** - * Converts this ImportTaxonomiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @instance - * @returns {Object.} JSON object - */ - ImportTaxonomiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportTaxonomiesRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportTaxonomiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ImportTaxonomiesRequest"; - }; - - return ImportTaxonomiesRequest; - })(); - - v1.InlineSource = (function() { - - /** - * Properties of an InlineSource. - * @memberof google.cloud.datacatalog.v1 - * @interface IInlineSource - * @property {Array.|null} [taxonomies] InlineSource taxonomies - */ - - /** - * Constructs a new InlineSource. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an InlineSource. - * @implements IInlineSource - * @constructor - * @param {google.cloud.datacatalog.v1.IInlineSource=} [properties] Properties to set - */ - function InlineSource(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InlineSource taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1.InlineSource - * @instance - */ - InlineSource.prototype.taxonomies = $util.emptyArray; - - /** - * Creates a new InlineSource instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.InlineSource - * @static - * @param {google.cloud.datacatalog.v1.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.InlineSource} InlineSource instance - */ - InlineSource.create = function create(properties) { - return new InlineSource(properties); - }; - - /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.datacatalog.v1.InlineSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.InlineSource - * @static - * @param {google.cloud.datacatalog.v1.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - $root.google.cloud.datacatalog.v1.SerializedTaxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.InlineSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.InlineSource - * @static - * @param {google.cloud.datacatalog.v1.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InlineSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.InlineSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push($root.google.cloud.datacatalog.v1.SerializedTaxonomy.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InlineSource message. - * @function verify - * @memberof google.cloud.datacatalog.v1.InlineSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InlineSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.verify(message.taxonomies[i]); - if (error) - return "taxonomies." + error; - } - } - return null; - }; - - /** - * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.InlineSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.InlineSource} InlineSource - */ - InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.InlineSource) - return object; - var message = new $root.google.cloud.datacatalog.v1.InlineSource(); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1.InlineSource.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) { - if (typeof object.taxonomies[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.InlineSource.taxonomies: object expected"); - message.taxonomies[i] = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.fromObject(object.taxonomies[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.InlineSource - * @static - * @param {google.cloud.datacatalog.v1.InlineSource} message InlineSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InlineSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.toObject(message.taxonomies[j], options); - } - return object; - }; - - /** - * Converts this InlineSource to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.InlineSource - * @instance - * @returns {Object.} JSON object - */ - InlineSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InlineSource - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.InlineSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.InlineSource"; - }; - - return InlineSource; - })(); - - v1.CrossRegionalSource = (function() { - - /** - * Properties of a CrossRegionalSource. - * @memberof google.cloud.datacatalog.v1 - * @interface ICrossRegionalSource - * @property {string|null} [taxonomy] CrossRegionalSource taxonomy - */ - - /** - * Constructs a new CrossRegionalSource. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents a CrossRegionalSource. - * @implements ICrossRegionalSource - * @constructor - * @param {google.cloud.datacatalog.v1.ICrossRegionalSource=} [properties] Properties to set - */ - function CrossRegionalSource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CrossRegionalSource taxonomy. - * @member {string} taxonomy - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @instance - */ - CrossRegionalSource.prototype.taxonomy = ""; - - /** - * Creates a new CrossRegionalSource instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @static - * @param {google.cloud.datacatalog.v1.ICrossRegionalSource=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.CrossRegionalSource} CrossRegionalSource instance - */ - CrossRegionalSource.create = function create(properties) { - return new CrossRegionalSource(properties); - }; - - /** - * Encodes the specified CrossRegionalSource message. Does not implicitly {@link google.cloud.datacatalog.v1.CrossRegionalSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @static - * @param {google.cloud.datacatalog.v1.ICrossRegionalSource} message CrossRegionalSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CrossRegionalSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomy != null && Object.hasOwnProperty.call(message, "taxonomy")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.taxonomy); - return writer; - }; - - /** - * Encodes the specified CrossRegionalSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.CrossRegionalSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @static - * @param {google.cloud.datacatalog.v1.ICrossRegionalSource} message CrossRegionalSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CrossRegionalSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CrossRegionalSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.CrossRegionalSource} CrossRegionalSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CrossRegionalSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.CrossRegionalSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.taxonomy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CrossRegionalSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.CrossRegionalSource} CrossRegionalSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CrossRegionalSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CrossRegionalSource message. - * @function verify - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CrossRegionalSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) - if (!$util.isString(message.taxonomy)) - return "taxonomy: string expected"; - return null; - }; - - /** - * Creates a CrossRegionalSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.CrossRegionalSource} CrossRegionalSource - */ - CrossRegionalSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.CrossRegionalSource) - return object; - var message = new $root.google.cloud.datacatalog.v1.CrossRegionalSource(); - if (object.taxonomy != null) - message.taxonomy = String(object.taxonomy); - return message; - }; - - /** - * Creates a plain object from a CrossRegionalSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @static - * @param {google.cloud.datacatalog.v1.CrossRegionalSource} message CrossRegionalSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CrossRegionalSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.taxonomy = ""; - if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) - object.taxonomy = message.taxonomy; - return object; - }; - - /** - * Converts this CrossRegionalSource to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @instance - * @returns {Object.} JSON object - */ - CrossRegionalSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CrossRegionalSource - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.CrossRegionalSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CrossRegionalSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.CrossRegionalSource"; - }; - - return CrossRegionalSource; - })(); - - v1.ImportTaxonomiesResponse = (function() { - - /** - * Properties of an ImportTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IImportTaxonomiesResponse - * @property {Array.|null} [taxonomies] ImportTaxonomiesResponse taxonomies - */ - - /** - * Constructs a new ImportTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an ImportTaxonomiesResponse. - * @implements IImportTaxonomiesResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesResponse=} [properties] Properties to set - */ - function ImportTaxonomiesResponse(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportTaxonomiesResponse taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @instance - */ - ImportTaxonomiesResponse.prototype.taxonomies = $util.emptyArray; - - /** - * Creates a new ImportTaxonomiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ImportTaxonomiesResponse} ImportTaxonomiesResponse instance - */ - ImportTaxonomiesResponse.create = function create(properties) { - return new ImportTaxonomiesResponse(properties); - }; - - /** - * Encodes the specified ImportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ImportTaxonomiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesResponse} message ImportTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportTaxonomiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - $root.google.cloud.datacatalog.v1.Taxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ImportTaxonomiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.IImportTaxonomiesResponse} message ImportTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ImportTaxonomiesResponse} ImportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportTaxonomiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ImportTaxonomiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push($root.google.cloud.datacatalog.v1.Taxonomy.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ImportTaxonomiesResponse} ImportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportTaxonomiesResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportTaxonomiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.Taxonomy.verify(message.taxonomies[i]); - if (error) - return "taxonomies." + error; - } - } - return null; - }; - - /** - * Creates an ImportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ImportTaxonomiesResponse} ImportTaxonomiesResponse - */ - ImportTaxonomiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ImportTaxonomiesResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.ImportTaxonomiesResponse(); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1.ImportTaxonomiesResponse.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) { - if (typeof object.taxonomies[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ImportTaxonomiesResponse.taxonomies: object expected"); - message.taxonomies[i] = $root.google.cloud.datacatalog.v1.Taxonomy.fromObject(object.taxonomies[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ImportTaxonomiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.ImportTaxonomiesResponse} message ImportTaxonomiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportTaxonomiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = $root.google.cloud.datacatalog.v1.Taxonomy.toObject(message.taxonomies[j], options); - } - return object; - }; - - /** - * Converts this ImportTaxonomiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @instance - * @returns {Object.} JSON object - */ - ImportTaxonomiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportTaxonomiesResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ImportTaxonomiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportTaxonomiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ImportTaxonomiesResponse"; - }; - - return ImportTaxonomiesResponse; - })(); - - v1.ExportTaxonomiesRequest = (function() { - - /** - * Properties of an ExportTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1 - * @interface IExportTaxonomiesRequest - * @property {string|null} [parent] ExportTaxonomiesRequest parent - * @property {Array.|null} [taxonomies] ExportTaxonomiesRequest taxonomies - * @property {boolean|null} [serializedTaxonomies] ExportTaxonomiesRequest serializedTaxonomies - */ - - /** - * Constructs a new ExportTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an ExportTaxonomiesRequest. - * @implements IExportTaxonomiesRequest - * @constructor - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesRequest=} [properties] Properties to set - */ - function ExportTaxonomiesRequest(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportTaxonomiesRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @instance - */ - ExportTaxonomiesRequest.prototype.parent = ""; - - /** - * ExportTaxonomiesRequest taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @instance - */ - ExportTaxonomiesRequest.prototype.taxonomies = $util.emptyArray; - - /** - * ExportTaxonomiesRequest serializedTaxonomies. - * @member {boolean|null|undefined} serializedTaxonomies - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @instance - */ - ExportTaxonomiesRequest.prototype.serializedTaxonomies = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExportTaxonomiesRequest destination. - * @member {"serializedTaxonomies"|undefined} destination - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @instance - */ - Object.defineProperty(ExportTaxonomiesRequest.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["serializedTaxonomies"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ExportTaxonomiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ExportTaxonomiesRequest} ExportTaxonomiesRequest instance - */ - ExportTaxonomiesRequest.create = function create(properties) { - return new ExportTaxonomiesRequest(properties); - }; - - /** - * Encodes the specified ExportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1.ExportTaxonomiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesRequest} message ExportTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTaxonomiesRequest.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.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taxonomies[i]); - if (message.serializedTaxonomies != null && Object.hasOwnProperty.call(message, "serializedTaxonomies")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.serializedTaxonomies); - return writer; - }; - - /** - * Encodes the specified ExportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ExportTaxonomiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesRequest} message ExportTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ExportTaxonomiesRequest} ExportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTaxonomiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ExportTaxonomiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push(reader.string()); - break; - } - case 3: { - message.serializedTaxonomies = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ExportTaxonomiesRequest} ExportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportTaxonomiesRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportTaxonomiesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) - if (!$util.isString(message.taxonomies[i])) - return "taxonomies: string[] expected"; - } - if (message.serializedTaxonomies != null && message.hasOwnProperty("serializedTaxonomies")) { - properties.destination = 1; - if (typeof message.serializedTaxonomies !== "boolean") - return "serializedTaxonomies: boolean expected"; - } - return null; - }; - - /** - * Creates an ExportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ExportTaxonomiesRequest} ExportTaxonomiesRequest - */ - ExportTaxonomiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ExportTaxonomiesRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1.ExportTaxonomiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1.ExportTaxonomiesRequest.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) - message.taxonomies[i] = String(object.taxonomies[i]); - } - if (object.serializedTaxonomies != null) - message.serializedTaxonomies = Boolean(object.serializedTaxonomies); - return message; - }; - - /** - * Creates a plain object from an ExportTaxonomiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1.ExportTaxonomiesRequest} message ExportTaxonomiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportTaxonomiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = message.taxonomies[j]; - } - if (message.serializedTaxonomies != null && message.hasOwnProperty("serializedTaxonomies")) { - object.serializedTaxonomies = message.serializedTaxonomies; - if (options.oneofs) - object.destination = "serializedTaxonomies"; - } - return object; - }; - - /** - * Converts this ExportTaxonomiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @instance - * @returns {Object.} JSON object - */ - ExportTaxonomiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportTaxonomiesRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportTaxonomiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ExportTaxonomiesRequest"; - }; - - return ExportTaxonomiesRequest; - })(); - - v1.ExportTaxonomiesResponse = (function() { - - /** - * Properties of an ExportTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1 - * @interface IExportTaxonomiesResponse - * @property {Array.|null} [taxonomies] ExportTaxonomiesResponse taxonomies - */ - - /** - * Constructs a new ExportTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1 - * @classdesc Represents an ExportTaxonomiesResponse. - * @implements IExportTaxonomiesResponse - * @constructor - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesResponse=} [properties] Properties to set - */ - function ExportTaxonomiesResponse(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportTaxonomiesResponse taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @instance - */ - ExportTaxonomiesResponse.prototype.taxonomies = $util.emptyArray; - - /** - * Creates a new ExportTaxonomiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1.ExportTaxonomiesResponse} ExportTaxonomiesResponse instance - */ - ExportTaxonomiesResponse.create = function create(properties) { - return new ExportTaxonomiesResponse(properties); - }; - - /** - * Encodes the specified ExportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1.ExportTaxonomiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesResponse} message ExportTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTaxonomiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - $root.google.cloud.datacatalog.v1.SerializedTaxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1.ExportTaxonomiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.IExportTaxonomiesResponse} message ExportTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1.ExportTaxonomiesResponse} ExportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTaxonomiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1.ExportTaxonomiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push($root.google.cloud.datacatalog.v1.SerializedTaxonomy.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1.ExportTaxonomiesResponse} ExportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportTaxonomiesResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportTaxonomiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) { - var error = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.verify(message.taxonomies[i]); - if (error) - return "taxonomies." + error; - } - } - return null; - }; - - /** - * Creates an ExportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1.ExportTaxonomiesResponse} ExportTaxonomiesResponse - */ - ExportTaxonomiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1.ExportTaxonomiesResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1.ExportTaxonomiesResponse(); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1.ExportTaxonomiesResponse.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) { - if (typeof object.taxonomies[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1.ExportTaxonomiesResponse.taxonomies: object expected"); - message.taxonomies[i] = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.fromObject(object.taxonomies[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ExportTaxonomiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1.ExportTaxonomiesResponse} message ExportTaxonomiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportTaxonomiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = $root.google.cloud.datacatalog.v1.SerializedTaxonomy.toObject(message.taxonomies[j], options); - } - return object; - }; - - /** - * Converts this ExportTaxonomiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @instance - * @returns {Object.} JSON object - */ - ExportTaxonomiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportTaxonomiesResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1.ExportTaxonomiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportTaxonomiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1.ExportTaxonomiesResponse"; - }; - - return ExportTaxonomiesResponse; - })(); - - return v1; - })(); - - datacatalog.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof google.cloud.datacatalog - * @namespace - */ - var v1beta1 = {}; - - /** - * IntegratedSystem enum. - * @name google.cloud.datacatalog.v1beta1.IntegratedSystem - * @enum {number} - * @property {number} INTEGRATED_SYSTEM_UNSPECIFIED=0 INTEGRATED_SYSTEM_UNSPECIFIED value - * @property {number} BIGQUERY=1 BIGQUERY value - * @property {number} CLOUD_PUBSUB=2 CLOUD_PUBSUB value - */ - v1beta1.IntegratedSystem = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INTEGRATED_SYSTEM_UNSPECIFIED"] = 0; - values[valuesById[1] = "BIGQUERY"] = 1; - values[valuesById[2] = "CLOUD_PUBSUB"] = 2; - return values; - })(); - - v1beta1.DataCatalog = (function() { - - /** - * Constructs a new DataCatalog service. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DataCatalog - * @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 DataCatalog(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (DataCatalog.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataCatalog; - - /** - * Creates new DataCatalog service using the specified rpc implementation. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @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 {DataCatalog} RPC service. Useful where requests and/or responses are streamed. - */ - DataCatalog.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|searchCatalog}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef SearchCatalogCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} [response] SearchCatalogResponse - */ - - /** - * Calls SearchCatalog. - * @function searchCatalog - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} request SearchCatalogRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalogCallback} callback Node-style callback called with the error, if any, and SearchCatalogResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.searchCatalog = function searchCatalog(request, callback) { - return this.rpcCall(searchCatalog, $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest, $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse, request, callback); - }, "name", { value: "SearchCatalog" }); - - /** - * Calls SearchCatalog. - * @function searchCatalog - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} request SearchCatalogRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createEntryGroup}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.EntryGroup} [response] EntryGroup - */ - - /** - * Calls CreateEntryGroup. - * @function createEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createEntryGroup = function createEntryGroup(request, callback) { - return this.rpcCall(createEntryGroup, $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest, $root.google.cloud.datacatalog.v1beta1.EntryGroup, request, callback); - }, "name", { value: "CreateEntryGroup" }); - - /** - * Calls CreateEntryGroup. - * @function createEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} request CreateEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateEntryGroup}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef UpdateEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.EntryGroup} [response] EntryGroup - */ - - /** - * Calls UpdateEntryGroup. - * @function updateEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest} request UpdateEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateEntryGroup = function updateEntryGroup(request, callback) { - return this.rpcCall(updateEntryGroup, $root.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest, $root.google.cloud.datacatalog.v1beta1.EntryGroup, request, callback); - }, "name", { value: "UpdateEntryGroup" }); - - /** - * Calls UpdateEntryGroup. - * @function updateEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest} request UpdateEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|getEntryGroup}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef GetEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.EntryGroup} [response] EntryGroup - */ - - /** - * Calls GetEntryGroup. - * @function getEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroupCallback} callback Node-style callback called with the error, if any, and EntryGroup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.getEntryGroup = function getEntryGroup(request, callback) { - return this.rpcCall(getEntryGroup, $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest, $root.google.cloud.datacatalog.v1beta1.EntryGroup, request, callback); - }, "name", { value: "GetEntryGroup" }); - - /** - * Calls GetEntryGroup. - * @function getEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} request GetEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteEntryGroup}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteEntryGroupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteEntryGroup. - * @function deleteEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroupCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteEntryGroup = function deleteEntryGroup(request, callback) { - return this.rpcCall(deleteEntryGroup, $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntryGroup" }); - - /** - * Calls DeleteEntryGroup. - * @function deleteEntryGroup - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} request DeleteEntryGroupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|listEntryGroups}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef ListEntryGroupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse} [response] ListEntryGroupsResponse - */ - - /** - * Calls ListEntryGroups. - * @function listEntryGroups - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest} request ListEntryGroupsRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroupsCallback} callback Node-style callback called with the error, if any, and ListEntryGroupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.listEntryGroups = function listEntryGroups(request, callback) { - return this.rpcCall(listEntryGroups, $root.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest, $root.google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse, request, callback); - }, "name", { value: "ListEntryGroups" }); - - /** - * Calls ListEntryGroups. - * @function listEntryGroups - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest} request ListEntryGroupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry - */ - - /** - * Calls CreateEntry. - * @function createEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} request CreateEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createEntry = function createEntry(request, callback) { - return this.rpcCall(createEntry, $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); - }, "name", { value: "CreateEntry" }); - - /** - * Calls CreateEntry. - * @function createEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} request CreateEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef UpdateEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry - */ - - /** - * Calls UpdateEntry. - * @function updateEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateEntry = function updateEntry(request, callback) { - return this.rpcCall(updateEntry, $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); - }, "name", { value: "UpdateEntry" }); - - /** - * Calls UpdateEntry. - * @function updateEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} request UpdateEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteEntry. - * @function deleteEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteEntry = function deleteEntry(request, callback) { - return this.rpcCall(deleteEntry, $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntry" }); - - /** - * Calls DeleteEntry. - * @function deleteEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} request DeleteEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|getEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef GetEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry - */ - - /** - * Calls GetEntry. - * @function getEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} request GetEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.getEntry = function getEntry(request, callback) { - return this.rpcCall(getEntry, $root.google.cloud.datacatalog.v1beta1.GetEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); - }, "name", { value: "GetEntry" }); - - /** - * Calls GetEntry. - * @function getEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} request GetEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|lookupEntry}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef LookupEntryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Entry} [response] Entry - */ - - /** - * Calls LookupEntry. - * @function lookupEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} request LookupEntryRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntryCallback} callback Node-style callback called with the error, if any, and Entry - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.lookupEntry = function lookupEntry(request, callback) { - return this.rpcCall(lookupEntry, $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest, $root.google.cloud.datacatalog.v1beta1.Entry, request, callback); - }, "name", { value: "LookupEntry" }); - - /** - * Calls LookupEntry. - * @function lookupEntry - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} request LookupEntryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|listEntries}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef ListEntriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.ListEntriesResponse} [response] ListEntriesResponse - */ - - /** - * Calls ListEntries. - * @function listEntries - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListEntriesRequest} request ListEntriesRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.ListEntriesCallback} callback Node-style callback called with the error, if any, and ListEntriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.listEntries = function listEntries(request, callback) { - return this.rpcCall(listEntries, $root.google.cloud.datacatalog.v1beta1.ListEntriesRequest, $root.google.cloud.datacatalog.v1beta1.ListEntriesResponse, request, callback); - }, "name", { value: "ListEntries" }); - - /** - * Calls ListEntries. - * @function listEntries - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListEntriesRequest} request ListEntriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createTagTemplate}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} [response] TagTemplate - */ - - /** - * Calls CreateTagTemplate. - * @function createTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} request CreateTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createTagTemplate = function createTagTemplate(request, callback) { - return this.rpcCall(createTagTemplate, $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplate, request, callback); - }, "name", { value: "CreateTagTemplate" }); - - /** - * Calls CreateTagTemplate. - * @function createTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} request CreateTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|getTagTemplate}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef GetTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} [response] TagTemplate - */ - - /** - * Calls GetTagTemplate. - * @function getTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} request GetTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.getTagTemplate = function getTagTemplate(request, callback) { - return this.rpcCall(getTagTemplate, $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplate, request, callback); - }, "name", { value: "GetTagTemplate" }); - - /** - * Calls GetTagTemplate. - * @function getTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} request GetTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateTagTemplate}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef UpdateTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} [response] TagTemplate - */ - - /** - * Calls UpdateTagTemplate. - * @function updateTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} request UpdateTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateCallback} callback Node-style callback called with the error, if any, and TagTemplate - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateTagTemplate = function updateTagTemplate(request, callback) { - return this.rpcCall(updateTagTemplate, $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplate, request, callback); - }, "name", { value: "UpdateTagTemplate" }); - - /** - * Calls UpdateTagTemplate. - * @function updateTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} request UpdateTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteTagTemplate}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteTagTemplateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTagTemplate. - * @function deleteTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} request DeleteTagTemplateRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteTagTemplate = function deleteTagTemplate(request, callback) { - return this.rpcCall(deleteTagTemplate, $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTagTemplate" }); - - /** - * Calls DeleteTagTemplate. - * @function deleteTagTemplate - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} request DeleteTagTemplateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createTagTemplateField}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField - */ - - /** - * Calls CreateTagTemplateField. - * @function createTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} request CreateTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createTagTemplateField = function createTagTemplateField(request, callback) { - return this.rpcCall(createTagTemplateField, $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); - }, "name", { value: "CreateTagTemplateField" }); - - /** - * Calls CreateTagTemplateField. - * @function createTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} request CreateTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateTagTemplateField}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef UpdateTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField - */ - - /** - * Calls UpdateTagTemplateField. - * @function updateTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} request UpdateTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateTagTemplateField = function updateTagTemplateField(request, callback) { - return this.rpcCall(updateTagTemplateField, $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); - }, "name", { value: "UpdateTagTemplateField" }); - - /** - * Calls UpdateTagTemplateField. - * @function updateTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} request UpdateTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|renameTagTemplateField}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef RenameTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} [response] TagTemplateField - */ - - /** - * Calls RenameTagTemplateField. - * @function renameTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} request RenameTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and TagTemplateField - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.renameTagTemplateField = function renameTagTemplateField(request, callback) { - return this.rpcCall(renameTagTemplateField, $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest, $root.google.cloud.datacatalog.v1beta1.TagTemplateField, request, callback); - }, "name", { value: "RenameTagTemplateField" }); - - /** - * Calls RenameTagTemplateField. - * @function renameTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} request RenameTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteTagTemplateField}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteTagTemplateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTagTemplateField. - * @function deleteTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} request DeleteTagTemplateFieldRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateFieldCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteTagTemplateField = function deleteTagTemplateField(request, callback) { - return this.rpcCall(deleteTagTemplateField, $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTagTemplateField" }); - - /** - * Calls DeleteTagTemplateField. - * @function deleteTagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} request DeleteTagTemplateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|createTag}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef CreateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Tag} [response] Tag - */ - - /** - * Calls CreateTag. - * @function createTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} request CreateTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.createTag = function createTag(request, callback) { - return this.rpcCall(createTag, $root.google.cloud.datacatalog.v1beta1.CreateTagRequest, $root.google.cloud.datacatalog.v1beta1.Tag, request, callback); - }, "name", { value: "CreateTag" }); - - /** - * Calls CreateTag. - * @function createTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} request CreateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|updateTag}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef UpdateTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Tag} [response] Tag - */ - - /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagCallback} callback Node-style callback called with the error, if any, and Tag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.updateTag = function updateTag(request, callback) { - return this.rpcCall(updateTag, $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest, $root.google.cloud.datacatalog.v1beta1.Tag, request, callback); - }, "name", { value: "UpdateTag" }); - - /** - * Calls UpdateTag. - * @function updateTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} request UpdateTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|deleteTag}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef DeleteTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTag. - * @function deleteTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.deleteTag = function deleteTag(request, callback) { - return this.rpcCall(deleteTag, $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTag" }); - - /** - * Calls DeleteTag. - * @function deleteTag - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} request DeleteTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|listTags}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef ListTagsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.ListTagsResponse} [response] ListTagsResponse - */ - - /** - * Calls ListTags. - * @function listTags - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} request ListTagsRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.ListTagsCallback} callback Node-style callback called with the error, if any, and ListTagsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.listTags = function listTags(request, callback) { - return this.rpcCall(listTags, $root.google.cloud.datacatalog.v1beta1.ListTagsRequest, $root.google.cloud.datacatalog.v1beta1.ListTagsResponse, request, callback); - }, "name", { value: "ListTags" }); - - /** - * Calls ListTags. - * @function listTags - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} request ListTagsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|setIamPolicy}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|getIamPolicy}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.DataCatalog|testIamPermissions}. - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataCatalog.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1beta1.DataCatalog - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return DataCatalog; - })(); - - v1beta1.SearchCatalogRequest = (function() { - - /** - * Properties of a SearchCatalogRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISearchCatalogRequest - * @property {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null} [scope] SearchCatalogRequest scope - * @property {string|null} [query] SearchCatalogRequest query - * @property {number|null} [pageSize] SearchCatalogRequest pageSize - * @property {string|null} [pageToken] SearchCatalogRequest pageToken - * @property {string|null} [orderBy] SearchCatalogRequest orderBy - */ - - /** - * Constructs a new SearchCatalogRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SearchCatalogRequest. - * @implements ISearchCatalogRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest=} [properties] Properties to set - */ - function SearchCatalogRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchCatalogRequest scope. - * @member {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope|null|undefined} scope - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.scope = null; - - /** - * SearchCatalogRequest query. - * @member {string} query - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.query = ""; - - /** - * SearchCatalogRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.pageSize = 0; - - /** - * SearchCatalogRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.pageToken = ""; - - /** - * SearchCatalogRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @instance - */ - SearchCatalogRequest.prototype.orderBy = ""; - - /** - * Creates a new SearchCatalogRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest instance - */ - SearchCatalogRequest.create = function create(properties) { - return new SearchCatalogRequest(properties); - }; - - /** - * Encodes the specified SearchCatalogRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} message SearchCatalogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.encode(message.scope, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SearchCatalogRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogRequest} message SearchCatalogRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: { - message.scope = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.decode(reader, reader.uint32()); - break; - } - case 1: { - message.query = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchCatalogRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchCatalogRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchCatalogRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) { - var error = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify(message.scope); - if (error) - return "scope." + error; - } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; - - /** - * Creates a SearchCatalogRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} SearchCatalogRequest - */ - SearchCatalogRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest(); - if (object.scope != null) { - if (typeof object.scope !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.scope: object expected"); - message.scope = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.fromObject(object.scope); - } - if (object.query != null) - message.query = String(object.query); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a SearchCatalogRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest} message SearchCatalogRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchCatalogRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.query = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - object.scope = null; - } - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.toObject(message.scope, options); - return object; - }; - - /** - * Converts this SearchCatalogRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @instance - * @returns {Object.} JSON object - */ - SearchCatalogRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchCatalogRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchCatalogRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.SearchCatalogRequest"; - }; - - SearchCatalogRequest.Scope = (function() { - - /** - * Properties of a Scope. - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @interface IScope - * @property {Array.|null} [includeOrgIds] Scope includeOrgIds - * @property {Array.|null} [includeProjectIds] Scope includeProjectIds - * @property {boolean|null} [includeGcpPublicDatasets] Scope includeGcpPublicDatasets - */ - - /** - * Constructs a new Scope. - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest - * @classdesc Represents a Scope. - * @implements IScope - * @constructor - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope=} [properties] Properties to set - */ - function Scope(properties) { - this.includeOrgIds = []; - this.includeProjectIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Scope includeOrgIds. - * @member {Array.} includeOrgIds - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includeOrgIds = $util.emptyArray; - - /** - * Scope includeProjectIds. - * @member {Array.} includeProjectIds - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includeProjectIds = $util.emptyArray; - - /** - * Scope includeGcpPublicDatasets. - * @member {boolean} includeGcpPublicDatasets - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @instance - */ - Scope.prototype.includeGcpPublicDatasets = false; - - /** - * Creates a new Scope instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope instance - */ - Scope.create = function create(properties) { - return new Scope(properties); - }; - - /** - * Encodes the specified Scope message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope} message Scope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scope.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.includeOrgIds != null && message.includeOrgIds.length) - for (var i = 0; i < message.includeOrgIds.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.includeOrgIds[i]); - if (message.includeProjectIds != null && message.includeProjectIds.length) - for (var i = 0; i < message.includeProjectIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.includeProjectIds[i]); - if (message.includeGcpPublicDatasets != null && Object.hasOwnProperty.call(message, "includeGcpPublicDatasets")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.includeGcpPublicDatasets); - return writer; - }; - - /** - * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.IScope} message Scope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scope.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Scope message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scope.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.includeOrgIds && message.includeOrgIds.length)) - message.includeOrgIds = []; - message.includeOrgIds.push(reader.string()); - break; - } - case 3: { - if (!(message.includeProjectIds && message.includeProjectIds.length)) - message.includeProjectIds = []; - message.includeProjectIds.push(reader.string()); - break; - } - case 7: { - message.includeGcpPublicDatasets = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Scope message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scope.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Scope message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Scope.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.includeOrgIds != null && message.hasOwnProperty("includeOrgIds")) { - if (!Array.isArray(message.includeOrgIds)) - return "includeOrgIds: array expected"; - for (var i = 0; i < message.includeOrgIds.length; ++i) - if (!$util.isString(message.includeOrgIds[i])) - return "includeOrgIds: string[] expected"; - } - if (message.includeProjectIds != null && message.hasOwnProperty("includeProjectIds")) { - if (!Array.isArray(message.includeProjectIds)) - return "includeProjectIds: array expected"; - for (var i = 0; i < message.includeProjectIds.length; ++i) - if (!$util.isString(message.includeProjectIds[i])) - return "includeProjectIds: string[] expected"; - } - if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) - if (typeof message.includeGcpPublicDatasets !== "boolean") - return "includeGcpPublicDatasets: boolean expected"; - return null; - }; - - /** - * Creates a Scope message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} Scope - */ - Scope.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope(); - if (object.includeOrgIds) { - if (!Array.isArray(object.includeOrgIds)) - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.includeOrgIds: array expected"); - message.includeOrgIds = []; - for (var i = 0; i < object.includeOrgIds.length; ++i) - message.includeOrgIds[i] = String(object.includeOrgIds[i]); - } - if (object.includeProjectIds) { - if (!Array.isArray(object.includeProjectIds)) - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope.includeProjectIds: array expected"); - message.includeProjectIds = []; - for (var i = 0; i < object.includeProjectIds.length; ++i) - message.includeProjectIds[i] = String(object.includeProjectIds[i]); - } - if (object.includeGcpPublicDatasets != null) - message.includeGcpPublicDatasets = Boolean(object.includeGcpPublicDatasets); - return message; - }; - - /** - * Creates a plain object from a Scope message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} message Scope - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Scope.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includeOrgIds = []; - object.includeProjectIds = []; - } - if (options.defaults) - object.includeGcpPublicDatasets = false; - if (message.includeOrgIds && message.includeOrgIds.length) { - object.includeOrgIds = []; - for (var j = 0; j < message.includeOrgIds.length; ++j) - object.includeOrgIds[j] = message.includeOrgIds[j]; - } - if (message.includeProjectIds && message.includeProjectIds.length) { - object.includeProjectIds = []; - for (var j = 0; j < message.includeProjectIds.length; ++j) - object.includeProjectIds[j] = message.includeProjectIds[j]; - } - if (message.includeGcpPublicDatasets != null && message.hasOwnProperty("includeGcpPublicDatasets")) - object.includeGcpPublicDatasets = message.includeGcpPublicDatasets; - return object; - }; - - /** - * Converts this Scope to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @instance - * @returns {Object.} JSON object - */ - Scope.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Scope - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Scope.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope"; - }; - - return Scope; - })(); - - return SearchCatalogRequest; - })(); - - v1beta1.SearchCatalogResponse = (function() { - - /** - * Properties of a SearchCatalogResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISearchCatalogResponse - * @property {Array.|null} [results] SearchCatalogResponse results - * @property {string|null} [nextPageToken] SearchCatalogResponse nextPageToken - */ - - /** - * Constructs a new SearchCatalogResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SearchCatalogResponse. - * @implements ISearchCatalogResponse - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse=} [properties] Properties to set - */ - function SearchCatalogResponse(properties) { - this.results = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchCatalogResponse results. - * @member {Array.} results - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.results = $util.emptyArray; - - /** - * SearchCatalogResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @instance - */ - SearchCatalogResponse.prototype.nextPageToken = ""; - - /** - * Creates a new SearchCatalogResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse instance - */ - SearchCatalogResponse.create = function create(properties) { - return new SearchCatalogResponse(properties); - }; - - /** - * Encodes the specified SearchCatalogResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse} message SearchCatalogResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified SearchCatalogResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResponse} message SearchCatalogResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.results && message.results.length)) - message.results = []; - message.results.push($root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.decode(reader, reader.uint32())); - break; - } - case 3: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchCatalogResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchCatalogResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchCatalogResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify(message.results[i]); - if (error) - return "results." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a SearchCatalogResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} SearchCatalogResponse - */ - SearchCatalogResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SearchCatalogResponse.results: object expected"); - message.results[i] = $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.fromObject(object.results[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a SearchCatalogResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogResponse} message SearchCatalogResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchCatalogResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.results = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult.toObject(message.results[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this SearchCatalogResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @instance - * @returns {Object.} JSON object - */ - SearchCatalogResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchCatalogResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchCatalogResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.SearchCatalogResponse"; - }; - - return SearchCatalogResponse; - })(); - - v1beta1.CreateEntryGroupRequest = (function() { - - /** - * Properties of a CreateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateEntryGroupRequest - * @property {string|null} [parent] CreateEntryGroupRequest parent - * @property {string|null} [entryGroupId] CreateEntryGroupRequest entryGroupId - * @property {google.cloud.datacatalog.v1beta1.IEntryGroup|null} [entryGroup] CreateEntryGroupRequest entryGroup - */ - - /** - * Constructs a new CreateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateEntryGroupRequest. - * @implements ICreateEntryGroupRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest=} [properties] Properties to set - */ - function CreateEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEntryGroupRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.parent = ""; - - /** - * CreateEntryGroupRequest entryGroupId. - * @member {string} entryGroupId - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.entryGroupId = ""; - - /** - * CreateEntryGroupRequest entryGroup. - * @member {google.cloud.datacatalog.v1beta1.IEntryGroup|null|undefined} entryGroup - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @instance - */ - CreateEntryGroupRequest.prototype.entryGroup = null; - - /** - * Creates a new CreateEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest instance - */ - CreateEntryGroupRequest.create = function create(properties) { - return new CreateEntryGroupRequest(properties); - }; - - /** - * Encodes the specified CreateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} message CreateEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryGroupRequest.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.entryGroup != null && Object.hasOwnProperty.call(message, "entryGroup")) - $root.google.cloud.datacatalog.v1beta1.EntryGroup.encode(message.entryGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.entryGroupId != null && Object.hasOwnProperty.call(message, "entryGroupId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryGroupId); - return writer; - }; - - /** - * Encodes the specified CreateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest} message CreateEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryGroupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.entryGroupId = reader.string(); - break; - } - case 2: { - message.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEntryGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEntryGroupRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEntryGroupRequest.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.entryGroupId != null && message.hasOwnProperty("entryGroupId")) - if (!$util.isString(message.entryGroupId)) - return "entryGroupId: string expected"; - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) { - var error = $root.google.cloud.datacatalog.v1beta1.EntryGroup.verify(message.entryGroup); - if (error) - return "entryGroup." + error; - } - return null; - }; - - /** - * Creates a CreateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} CreateEntryGroupRequest - */ - CreateEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entryGroupId != null) - message.entryGroupId = String(object.entryGroupId); - if (object.entryGroup != null) { - if (typeof object.entryGroup !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.entryGroup: object expected"); - message.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.fromObject(object.entryGroup); - } - return message; - }; - - /** - * Creates a plain object from a CreateEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest} message CreateEntryGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEntryGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.entryGroup = null; - object.entryGroupId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) - object.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.toObject(message.entryGroup, options); - if (message.entryGroupId != null && message.hasOwnProperty("entryGroupId")) - object.entryGroupId = message.entryGroupId; - return object; - }; - - /** - * Converts this CreateEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEntryGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEntryGroupRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEntryGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest"; - }; - - return CreateEntryGroupRequest; - })(); - - v1beta1.UpdateEntryGroupRequest = (function() { - - /** - * Properties of an UpdateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateEntryGroupRequest - * @property {google.cloud.datacatalog.v1beta1.IEntryGroup|null} [entryGroup] UpdateEntryGroupRequest entryGroup - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryGroupRequest updateMask - */ - - /** - * Constructs a new UpdateEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateEntryGroupRequest. - * @implements IUpdateEntryGroupRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest=} [properties] Properties to set - */ - function UpdateEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEntryGroupRequest entryGroup. - * @member {google.cloud.datacatalog.v1beta1.IEntryGroup|null|undefined} entryGroup - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @instance - */ - UpdateEntryGroupRequest.prototype.entryGroup = null; - - /** - * UpdateEntryGroupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @instance - */ - UpdateEntryGroupRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest} UpdateEntryGroupRequest instance - */ - UpdateEntryGroupRequest.create = function create(properties) { - return new UpdateEntryGroupRequest(properties); - }; - - /** - * Encodes the specified UpdateEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest} message UpdateEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entryGroup != null && Object.hasOwnProperty.call(message, "entryGroup")) - $root.google.cloud.datacatalog.v1beta1.EntryGroup.encode(message.entryGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest} message UpdateEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEntryGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest} UpdateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryGroupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEntryGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest} UpdateEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEntryGroupRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEntryGroupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) { - var error = $root.google.cloud.datacatalog.v1beta1.EntryGroup.verify(message.entryGroup); - if (error) - return "entryGroup." + 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 UpdateEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest} UpdateEntryGroupRequest - */ - UpdateEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest(); - if (object.entryGroup != null) { - if (typeof object.entryGroup !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest.entryGroup: object expected"); - message.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.fromObject(object.entryGroup); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest} message UpdateEntryGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEntryGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entryGroup = null; - object.updateMask = null; - } - if (message.entryGroup != null && message.hasOwnProperty("entryGroup")) - object.entryGroup = $root.google.cloud.datacatalog.v1beta1.EntryGroup.toObject(message.entryGroup, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEntryGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEntryGroupRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEntryGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest"; - }; - - return UpdateEntryGroupRequest; - })(); - - v1beta1.GetEntryGroupRequest = (function() { - - /** - * Properties of a GetEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGetEntryGroupRequest - * @property {string|null} [name] GetEntryGroupRequest name - * @property {google.protobuf.IFieldMask|null} [readMask] GetEntryGroupRequest readMask - */ - - /** - * Constructs a new GetEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GetEntryGroupRequest. - * @implements IGetEntryGroupRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest=} [properties] Properties to set - */ - function GetEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEntryGroupRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @instance - */ - GetEntryGroupRequest.prototype.name = ""; - - /** - * GetEntryGroupRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @instance - */ - GetEntryGroupRequest.prototype.readMask = null; - - /** - * Creates a new GetEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest instance - */ - GetEntryGroupRequest.create = function create(properties) { - return new GetEntryGroupRequest(properties); - }; - - /** - * Encodes the specified GetEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} message GetEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryGroupRequest.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.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest} message GetEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryGroupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetEntryGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEntryGroupRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEntryGroupRequest.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.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - return null; - }; - - /** - * Creates a GetEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} GetEntryGroupRequest - */ - GetEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - return message; - }; - - /** - * Creates a plain object from a GetEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.GetEntryGroupRequest} message GetEntryGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEntryGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.readMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - return object; - }; - - /** - * Converts this GetEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @instance - * @returns {Object.} JSON object - */ - GetEntryGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEntryGroupRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.GetEntryGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEntryGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.GetEntryGroupRequest"; - }; - - return GetEntryGroupRequest; - })(); - - v1beta1.DeleteEntryGroupRequest = (function() { - - /** - * Properties of a DeleteEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteEntryGroupRequest - * @property {string|null} [name] DeleteEntryGroupRequest name - * @property {boolean|null} [force] DeleteEntryGroupRequest force - */ - - /** - * Constructs a new DeleteEntryGroupRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteEntryGroupRequest. - * @implements IDeleteEntryGroupRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest=} [properties] Properties to set - */ - function DeleteEntryGroupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEntryGroupRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @instance - */ - DeleteEntryGroupRequest.prototype.name = ""; - - /** - * DeleteEntryGroupRequest force. - * @member {boolean} force - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @instance - */ - DeleteEntryGroupRequest.prototype.force = false; - - /** - * Creates a new DeleteEntryGroupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest instance - */ - DeleteEntryGroupRequest.create = function create(properties) { - return new DeleteEntryGroupRequest(properties); - }; - - /** - * Encodes the specified DeleteEntryGroupRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} message DeleteEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryGroupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteEntryGroupRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest} message DeleteEntryGroupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryGroupRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteEntryGroupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryGroupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEntryGroupRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEntryGroupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteEntryGroupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} DeleteEntryGroupRequest - */ - DeleteEntryGroupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteEntryGroupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest} message DeleteEntryGroupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEntryGroupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteEntryGroupRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEntryGroupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEntryGroupRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEntryGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest"; - }; - - return DeleteEntryGroupRequest; - })(); - - v1beta1.ListEntryGroupsRequest = (function() { - - /** - * Properties of a ListEntryGroupsRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListEntryGroupsRequest - * @property {string|null} [parent] ListEntryGroupsRequest parent - * @property {number|null} [pageSize] ListEntryGroupsRequest pageSize - * @property {string|null} [pageToken] ListEntryGroupsRequest pageToken - */ - - /** - * Constructs a new ListEntryGroupsRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListEntryGroupsRequest. - * @implements IListEntryGroupsRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest=} [properties] Properties to set - */ - function ListEntryGroupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntryGroupsRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.parent = ""; - - /** - * ListEntryGroupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.pageSize = 0; - - /** - * ListEntryGroupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @instance - */ - ListEntryGroupsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListEntryGroupsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest} ListEntryGroupsRequest instance - */ - ListEntryGroupsRequest.create = function create(properties) { - return new ListEntryGroupsRequest(properties); - }; - - /** - * Encodes the specified ListEntryGroupsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest} message ListEntryGroupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryGroupsRequest.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 ListEntryGroupsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest} message ListEntryGroupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntryGroupsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest} ListEntryGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryGroupsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest(); - 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 ListEntryGroupsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest} ListEntryGroupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryGroupsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntryGroupsRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntryGroupsRequest.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 ListEntryGroupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest} ListEntryGroupsRequest - */ - ListEntryGroupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest(); - 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 ListEntryGroupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest} message ListEntryGroupsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntryGroupsRequest.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 ListEntryGroupsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @instance - * @returns {Object.} JSON object - */ - ListEntryGroupsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntryGroupsRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntryGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest"; - }; - - return ListEntryGroupsRequest; - })(); - - v1beta1.ListEntryGroupsResponse = (function() { - - /** - * Properties of a ListEntryGroupsResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListEntryGroupsResponse - * @property {Array.|null} [entryGroups] ListEntryGroupsResponse entryGroups - * @property {string|null} [nextPageToken] ListEntryGroupsResponse nextPageToken - */ - - /** - * Constructs a new ListEntryGroupsResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListEntryGroupsResponse. - * @implements IListEntryGroupsResponse - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse=} [properties] Properties to set - */ - function ListEntryGroupsResponse(properties) { - this.entryGroups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntryGroupsResponse entryGroups. - * @member {Array.} entryGroups - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @instance - */ - ListEntryGroupsResponse.prototype.entryGroups = $util.emptyArray; - - /** - * ListEntryGroupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @instance - */ - ListEntryGroupsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEntryGroupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse} ListEntryGroupsResponse instance - */ - ListEntryGroupsResponse.create = function create(properties) { - return new ListEntryGroupsResponse(properties); - }; - - /** - * Encodes the specified ListEntryGroupsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse} message ListEntryGroupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryGroupsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entryGroups != null && message.entryGroups.length) - for (var i = 0; i < message.entryGroups.length; ++i) - $root.google.cloud.datacatalog.v1beta1.EntryGroup.encode(message.entryGroups[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 ListEntryGroupsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse} message ListEntryGroupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntryGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntryGroupsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse} ListEntryGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryGroupsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.entryGroups && message.entryGroups.length)) - message.entryGroups = []; - message.entryGroups.push($root.google.cloud.datacatalog.v1beta1.EntryGroup.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntryGroupsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse} ListEntryGroupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntryGroupsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntryGroupsResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntryGroupsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entryGroups != null && message.hasOwnProperty("entryGroups")) { - if (!Array.isArray(message.entryGroups)) - return "entryGroups: array expected"; - for (var i = 0; i < message.entryGroups.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.EntryGroup.verify(message.entryGroups[i]); - if (error) - return "entryGroups." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEntryGroupsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse} ListEntryGroupsResponse - */ - ListEntryGroupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse(); - if (object.entryGroups) { - if (!Array.isArray(object.entryGroups)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse.entryGroups: array expected"); - message.entryGroups = []; - for (var i = 0; i < object.entryGroups.length; ++i) { - if (typeof object.entryGroups[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse.entryGroups: object expected"); - message.entryGroups[i] = $root.google.cloud.datacatalog.v1beta1.EntryGroup.fromObject(object.entryGroups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEntryGroupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse} message ListEntryGroupsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntryGroupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entryGroups = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entryGroups && message.entryGroups.length) { - object.entryGroups = []; - for (var j = 0; j < message.entryGroups.length; ++j) - object.entryGroups[j] = $root.google.cloud.datacatalog.v1beta1.EntryGroup.toObject(message.entryGroups[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEntryGroupsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @instance - * @returns {Object.} JSON object - */ - ListEntryGroupsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntryGroupsResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntryGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse"; - }; - - return ListEntryGroupsResponse; - })(); - - v1beta1.CreateEntryRequest = (function() { - - /** - * Properties of a CreateEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateEntryRequest - * @property {string|null} [parent] CreateEntryRequest parent - * @property {string|null} [entryId] CreateEntryRequest entryId - * @property {google.cloud.datacatalog.v1beta1.IEntry|null} [entry] CreateEntryRequest entry - */ - - /** - * Constructs a new CreateEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateEntryRequest. - * @implements ICreateEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest=} [properties] Properties to set - */ - function CreateEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEntryRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @instance - */ - CreateEntryRequest.prototype.parent = ""; - - /** - * CreateEntryRequest entryId. - * @member {string} entryId - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @instance - */ - CreateEntryRequest.prototype.entryId = ""; - - /** - * CreateEntryRequest entry. - * @member {google.cloud.datacatalog.v1beta1.IEntry|null|undefined} entry - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @instance - */ - CreateEntryRequest.prototype.entry = null; - - /** - * Creates a new CreateEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest instance - */ - CreateEntryRequest.create = function create(properties) { - return new CreateEntryRequest(properties); - }; - - /** - * Encodes the specified CreateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} message CreateEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryRequest.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.entry != null && Object.hasOwnProperty.call(message, "entry")) - $root.google.cloud.datacatalog.v1beta1.Entry.encode(message.entry, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.entryId != null && Object.hasOwnProperty.call(message, "entryId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.entryId); - return writer; - }; - - /** - * Encodes the specified CreateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateEntryRequest} message CreateEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.entryId = reader.string(); - break; - } - case 2: { - message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEntryRequest.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.entryId != null && message.hasOwnProperty("entryId")) - if (!$util.isString(message.entryId)) - return "entryId: string expected"; - if (message.entry != null && message.hasOwnProperty("entry")) { - var error = $root.google.cloud.datacatalog.v1beta1.Entry.verify(message.entry); - if (error) - return "entry." + error; - } - return null; - }; - - /** - * Creates a CreateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateEntryRequest} CreateEntryRequest - */ - CreateEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateEntryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entryId != null) - message.entryId = String(object.entryId); - if (object.entry != null) { - if (typeof object.entry !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateEntryRequest.entry: object expected"); - message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.fromObject(object.entry); - } - return message; - }; - - /** - * Creates a plain object from a CreateEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.CreateEntryRequest} message CreateEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEntryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.entry = null; - object.entryId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = $root.google.cloud.datacatalog.v1beta1.Entry.toObject(message.entry, options); - if (message.entryId != null && message.hasOwnProperty("entryId")) - object.entryId = message.entryId; - return object; - }; - - /** - * Converts this CreateEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.CreateEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.CreateEntryRequest"; - }; - - return CreateEntryRequest; - })(); - - v1beta1.UpdateEntryRequest = (function() { - - /** - * Properties of an UpdateEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateEntryRequest - * @property {google.cloud.datacatalog.v1beta1.IEntry|null} [entry] UpdateEntryRequest entry - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEntryRequest updateMask - */ - - /** - * Constructs a new UpdateEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateEntryRequest. - * @implements IUpdateEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest=} [properties] Properties to set - */ - function UpdateEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEntryRequest entry. - * @member {google.cloud.datacatalog.v1beta1.IEntry|null|undefined} entry - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @instance - */ - UpdateEntryRequest.prototype.entry = null; - - /** - * UpdateEntryRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @instance - */ - UpdateEntryRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest instance - */ - UpdateEntryRequest.create = function create(properties) { - return new UpdateEntryRequest(properties); - }; - - /** - * Encodes the specified UpdateEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} message UpdateEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entry != null && Object.hasOwnProperty.call(message, "entry")) - $root.google.cloud.datacatalog.v1beta1.Entry.encode(message.entry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateEntryRequest} message UpdateEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEntryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entry != null && message.hasOwnProperty("entry")) { - var error = $root.google.cloud.datacatalog.v1beta1.Entry.verify(message.entry); - if (error) - return "entry." + 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 UpdateEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} UpdateEntryRequest - */ - UpdateEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateEntryRequest(); - if (object.entry != null) { - if (typeof object.entry !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateEntryRequest.entry: object expected"); - message.entry = $root.google.cloud.datacatalog.v1beta1.Entry.fromObject(object.entry); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateEntryRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateEntryRequest} message UpdateEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEntryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entry = null; - object.updateMask = null; - } - if (message.entry != null && message.hasOwnProperty("entry")) - object.entry = $root.google.cloud.datacatalog.v1beta1.Entry.toObject(message.entry, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.UpdateEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.UpdateEntryRequest"; - }; - - return UpdateEntryRequest; - })(); - - v1beta1.DeleteEntryRequest = (function() { - - /** - * Properties of a DeleteEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteEntryRequest - * @property {string|null} [name] DeleteEntryRequest name - */ - - /** - * Constructs a new DeleteEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteEntryRequest. - * @implements IDeleteEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest=} [properties] Properties to set - */ - function DeleteEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEntryRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @instance - */ - DeleteEntryRequest.prototype.name = ""; - - /** - * Creates a new DeleteEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest instance - */ - DeleteEntryRequest.create = function create(properties) { - return new DeleteEntryRequest(properties); - }; - - /** - * Encodes the specified DeleteEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} message DeleteEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryRequest.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 DeleteEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteEntryRequest} message DeleteEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest(); - 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 DeleteEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEntryRequest.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 DeleteEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} DeleteEntryRequest - */ - DeleteEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteEntryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteEntryRequest} message DeleteEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEntryRequest.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 DeleteEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.DeleteEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.DeleteEntryRequest"; - }; - - return DeleteEntryRequest; - })(); - - v1beta1.GetEntryRequest = (function() { - - /** - * Properties of a GetEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGetEntryRequest - * @property {string|null} [name] GetEntryRequest name - */ - - /** - * Constructs a new GetEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GetEntryRequest. - * @implements IGetEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest=} [properties] Properties to set - */ - function GetEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEntryRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @instance - */ - GetEntryRequest.prototype.name = ""; - - /** - * Creates a new GetEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest instance - */ - GetEntryRequest.create = function create(properties) { - return new GetEntryRequest(properties); - }; - - /** - * Encodes the specified GetEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} message GetEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryRequest.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 GetEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetEntryRequest} message GetEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetEntryRequest(); - 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 GetEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEntryRequest.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 GetEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GetEntryRequest} GetEntryRequest - */ - GetEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GetEntryRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.GetEntryRequest} message GetEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEntryRequest.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 GetEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @instance - * @returns {Object.} JSON object - */ - GetEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.GetEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.GetEntryRequest"; - }; - - return GetEntryRequest; - })(); - - v1beta1.LookupEntryRequest = (function() { - - /** - * Properties of a LookupEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ILookupEntryRequest - * @property {string|null} [linkedResource] LookupEntryRequest linkedResource - * @property {string|null} [sqlResource] LookupEntryRequest sqlResource - */ - - /** - * Constructs a new LookupEntryRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a LookupEntryRequest. - * @implements ILookupEntryRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest=} [properties] Properties to set - */ - function LookupEntryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LookupEntryRequest linkedResource. - * @member {string|null|undefined} linkedResource - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.linkedResource = null; - - /** - * LookupEntryRequest sqlResource. - * @member {string|null|undefined} sqlResource - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @instance - */ - LookupEntryRequest.prototype.sqlResource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LookupEntryRequest targetName. - * @member {"linkedResource"|"sqlResource"|undefined} targetName - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @instance - */ - Object.defineProperty(LookupEntryRequest.prototype, "targetName", { - get: $util.oneOfGetter($oneOfFields = ["linkedResource", "sqlResource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LookupEntryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest instance - */ - LookupEntryRequest.create = function create(properties) { - return new LookupEntryRequest(properties); - }; - - /** - * Encodes the specified LookupEntryRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} message LookupEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookupEntryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.linkedResource); - if (message.sqlResource != null && Object.hasOwnProperty.call(message, "sqlResource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sqlResource); - return writer; - }; - - /** - * Encodes the specified LookupEntryRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.LookupEntryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ILookupEntryRequest} message LookupEntryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LookupEntryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LookupEntryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookupEntryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.linkedResource = reader.string(); - break; - } - case 3: { - message.sqlResource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LookupEntryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LookupEntryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LookupEntryRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LookupEntryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) { - properties.targetName = 1; - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; - } - if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) { - if (properties.targetName === 1) - return "targetName: multiple values"; - properties.targetName = 1; - if (!$util.isString(message.sqlResource)) - return "sqlResource: string expected"; - } - return null; - }; - - /** - * Creates a LookupEntryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.LookupEntryRequest} LookupEntryRequest - */ - LookupEntryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.LookupEntryRequest(); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - if (object.sqlResource != null) - message.sqlResource = String(object.sqlResource); - return message; - }; - - /** - * Creates a plain object from a LookupEntryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.LookupEntryRequest} message LookupEntryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LookupEntryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) { - object.linkedResource = message.linkedResource; - if (options.oneofs) - object.targetName = "linkedResource"; - } - if (message.sqlResource != null && message.hasOwnProperty("sqlResource")) { - object.sqlResource = message.sqlResource; - if (options.oneofs) - object.targetName = "sqlResource"; - } - return object; - }; - - /** - * Converts this LookupEntryRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @instance - * @returns {Object.} JSON object - */ - LookupEntryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LookupEntryRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.LookupEntryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LookupEntryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.LookupEntryRequest"; - }; - - return LookupEntryRequest; - })(); - - v1beta1.Entry = (function() { - - /** - * Properties of an Entry. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IEntry - * @property {string|null} [name] Entry name - * @property {string|null} [linkedResource] Entry linkedResource - * @property {google.cloud.datacatalog.v1beta1.EntryType|null} [type] Entry type - * @property {string|null} [userSpecifiedType] Entry userSpecifiedType - * @property {google.cloud.datacatalog.v1beta1.IntegratedSystem|null} [integratedSystem] Entry integratedSystem - * @property {string|null} [userSpecifiedSystem] Entry userSpecifiedSystem - * @property {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null} [gcsFilesetSpec] Entry gcsFilesetSpec - * @property {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null} [bigqueryTableSpec] Entry bigqueryTableSpec - * @property {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null} [bigqueryDateShardedSpec] Entry bigqueryDateShardedSpec - * @property {string|null} [displayName] Entry displayName - * @property {string|null} [description] Entry description - * @property {google.cloud.datacatalog.v1beta1.ISchema|null} [schema] Entry schema - * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [sourceSystemTimestamps] Entry sourceSystemTimestamps - */ - - /** - * Constructs a new Entry. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an Entry. - * @implements IEntry - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IEntry=} [properties] Properties to set - */ - function Entry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Entry name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.name = ""; - - /** - * Entry linkedResource. - * @member {string} linkedResource - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.linkedResource = ""; - - /** - * Entry type. - * @member {google.cloud.datacatalog.v1beta1.EntryType|null|undefined} type - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.type = null; - - /** - * Entry userSpecifiedType. - * @member {string|null|undefined} userSpecifiedType - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.userSpecifiedType = null; - - /** - * Entry integratedSystem. - * @member {google.cloud.datacatalog.v1beta1.IntegratedSystem|null|undefined} integratedSystem - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.integratedSystem = null; - - /** - * Entry userSpecifiedSystem. - * @member {string|null|undefined} userSpecifiedSystem - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.userSpecifiedSystem = null; - - /** - * Entry gcsFilesetSpec. - * @member {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec|null|undefined} gcsFilesetSpec - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.gcsFilesetSpec = null; - - /** - * Entry bigqueryTableSpec. - * @member {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec|null|undefined} bigqueryTableSpec - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.bigqueryTableSpec = null; - - /** - * Entry bigqueryDateShardedSpec. - * @member {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec|null|undefined} bigqueryDateShardedSpec - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.bigqueryDateShardedSpec = null; - - /** - * Entry displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.displayName = ""; - - /** - * Entry description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.description = ""; - - /** - * Entry schema. - * @member {google.cloud.datacatalog.v1beta1.ISchema|null|undefined} schema - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.schema = null; - - /** - * Entry sourceSystemTimestamps. - * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} sourceSystemTimestamps - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Entry.prototype.sourceSystemTimestamps = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Entry entryType. - * @member {"type"|"userSpecifiedType"|undefined} entryType - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "entryType", { - get: $util.oneOfGetter($oneOfFields = ["type", "userSpecifiedType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Entry system. - * @member {"integratedSystem"|"userSpecifiedSystem"|undefined} system - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "system", { - get: $util.oneOfGetter($oneOfFields = ["integratedSystem", "userSpecifiedSystem"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Entry typeSpec. - * @member {"gcsFilesetSpec"|"bigqueryTableSpec"|"bigqueryDateShardedSpec"|undefined} typeSpec - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "typeSpec", { - get: $util.oneOfGetter($oneOfFields = ["gcsFilesetSpec", "bigqueryTableSpec", "bigqueryDateShardedSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Entry instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @static - * @param {google.cloud.datacatalog.v1beta1.IEntry=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry instance - */ - Entry.create = function create(properties) { - return new Entry(properties); - }; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @static - * @param {google.cloud.datacatalog.v1beta1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.cloud.datacatalog.v1beta1.Schema.encode(message.schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.gcsFilesetSpec != null && Object.hasOwnProperty.call(message, "gcsFilesetSpec")) - $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.encode(message.gcsFilesetSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.sourceSystemTimestamps != null && Object.hasOwnProperty.call(message, "sourceSystemTimestamps")) - $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.encode(message.sourceSystemTimestamps, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.linkedResource); - if (message.bigqueryTableSpec != null && Object.hasOwnProperty.call(message, "bigqueryTableSpec")) - $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.encode(message.bigqueryTableSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.bigqueryDateShardedSpec != null && Object.hasOwnProperty.call(message, "bigqueryDateShardedSpec")) - $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.encode(message.bigqueryDateShardedSpec, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.userSpecifiedType != null && Object.hasOwnProperty.call(message, "userSpecifiedType")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.userSpecifiedType); - if (message.integratedSystem != null && Object.hasOwnProperty.call(message, "integratedSystem")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.integratedSystem); - if (message.userSpecifiedSystem != null && Object.hasOwnProperty.call(message, "userSpecifiedSystem")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.userSpecifiedSystem); - return writer; - }; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Entry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @static - * @param {google.cloud.datacatalog.v1beta1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Entry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 9: { - message.linkedResource = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - case 16: { - message.userSpecifiedType = reader.string(); - break; - } - case 17: { - message.integratedSystem = reader.int32(); - break; - } - case 18: { - message.userSpecifiedSystem = reader.string(); - break; - } - case 6: { - message.gcsFilesetSpec = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.decode(reader, reader.uint32()); - break; - } - case 12: { - message.bigqueryTableSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.decode(reader, reader.uint32()); - break; - } - case 15: { - message.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.decode(reader, reader.uint32()); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.schema = $root.google.cloud.datacatalog.v1beta1.Schema.decode(reader, reader.uint32()); - break; - } - case 7: { - message.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entry message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entry.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.linkedResource != null && message.hasOwnProperty("linkedResource")) - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { - properties.entryType = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 2: - case 5: - case 3: - case 4: - break; - } - } - if (message.userSpecifiedType != null && message.hasOwnProperty("userSpecifiedType")) { - if (properties.entryType === 1) - return "entryType: multiple values"; - properties.entryType = 1; - if (!$util.isString(message.userSpecifiedType)) - return "userSpecifiedType: string expected"; - } - if (message.integratedSystem != null && message.hasOwnProperty("integratedSystem")) { - properties.system = 1; - switch (message.integratedSystem) { - default: - return "integratedSystem: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.userSpecifiedSystem != null && message.hasOwnProperty("userSpecifiedSystem")) { - if (properties.system === 1) - return "system: multiple values"; - properties.system = 1; - if (!$util.isString(message.userSpecifiedSystem)) - return "userSpecifiedSystem: string expected"; - } - if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) { - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify(message.gcsFilesetSpec); - if (error) - return "gcsFilesetSpec." + error; - } - } - if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) { - if (properties.typeSpec === 1) - return "typeSpec: multiple values"; - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify(message.bigqueryTableSpec); - if (error) - return "bigqueryTableSpec." + error; - } - } - if (message.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) { - if (properties.typeSpec === 1) - return "typeSpec: multiple values"; - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify(message.bigqueryDateShardedSpec); - if (error) - return "bigqueryDateShardedSpec." + error; - } - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.google.cloud.datacatalog.v1beta1.Schema.verify(message.schema); - if (error) - return "schema." + error; - } - if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) { - var error = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.verify(message.sourceSystemTimestamps); - if (error) - return "sourceSystemTimestamps." + error; - } - return null; - }; - - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.Entry} Entry - */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.Entry) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.Entry(); - if (object.name != null) - message.name = String(object.name); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "ENTRY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 2: - message.type = 2; - break; - case "MODEL": - case 5: - message.type = 5; - break; - case "DATA_STREAM": - case 3: - message.type = 3; - break; - case "FILESET": - case 4: - message.type = 4; - break; - } - if (object.userSpecifiedType != null) - message.userSpecifiedType = String(object.userSpecifiedType); - switch (object.integratedSystem) { - default: - if (typeof object.integratedSystem === "number") { - message.integratedSystem = object.integratedSystem; - break; - } - break; - case "INTEGRATED_SYSTEM_UNSPECIFIED": - case 0: - message.integratedSystem = 0; - break; - case "BIGQUERY": - case 1: - message.integratedSystem = 1; - break; - case "CLOUD_PUBSUB": - case 2: - message.integratedSystem = 2; - break; - } - if (object.userSpecifiedSystem != null) - message.userSpecifiedSystem = String(object.userSpecifiedSystem); - if (object.gcsFilesetSpec != null) { - if (typeof object.gcsFilesetSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.gcsFilesetSpec: object expected"); - message.gcsFilesetSpec = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.fromObject(object.gcsFilesetSpec); - } - if (object.bigqueryTableSpec != null) { - if (typeof object.bigqueryTableSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.bigqueryTableSpec: object expected"); - message.bigqueryTableSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.fromObject(object.bigqueryTableSpec); - } - if (object.bigqueryDateShardedSpec != null) { - if (typeof object.bigqueryDateShardedSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.bigqueryDateShardedSpec: object expected"); - message.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.fromObject(object.bigqueryDateShardedSpec); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.schema: object expected"); - message.schema = $root.google.cloud.datacatalog.v1beta1.Schema.fromObject(object.schema); - } - if (object.sourceSystemTimestamps != null) { - if (typeof object.sourceSystemTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Entry.sourceSystemTimestamps: object expected"); - message.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.sourceSystemTimestamps); - } - return message; - }; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @static - * @param {google.cloud.datacatalog.v1beta1.Entry} message Entry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.schema = null; - object.sourceSystemTimestamps = null; - object.linkedResource = ""; - } - 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.datacatalog.v1beta1.EntryType[message.type] === undefined ? message.type : $root.google.cloud.datacatalog.v1beta1.EntryType[message.type] : message.type; - if (options.oneofs) - object.entryType = "type"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.google.cloud.datacatalog.v1beta1.Schema.toObject(message.schema, options); - if (message.gcsFilesetSpec != null && message.hasOwnProperty("gcsFilesetSpec")) { - object.gcsFilesetSpec = $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec.toObject(message.gcsFilesetSpec, options); - if (options.oneofs) - object.typeSpec = "gcsFilesetSpec"; - } - if (message.sourceSystemTimestamps != null && message.hasOwnProperty("sourceSystemTimestamps")) - object.sourceSystemTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.toObject(message.sourceSystemTimestamps, options); - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - object.linkedResource = message.linkedResource; - if (message.bigqueryTableSpec != null && message.hasOwnProperty("bigqueryTableSpec")) { - object.bigqueryTableSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec.toObject(message.bigqueryTableSpec, options); - if (options.oneofs) - object.typeSpec = "bigqueryTableSpec"; - } - if (message.bigqueryDateShardedSpec != null && message.hasOwnProperty("bigqueryDateShardedSpec")) { - object.bigqueryDateShardedSpec = $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.toObject(message.bigqueryDateShardedSpec, options); - if (options.oneofs) - object.typeSpec = "bigqueryDateShardedSpec"; - } - if (message.userSpecifiedType != null && message.hasOwnProperty("userSpecifiedType")) { - object.userSpecifiedType = message.userSpecifiedType; - if (options.oneofs) - object.entryType = "userSpecifiedType"; - } - if (message.integratedSystem != null && message.hasOwnProperty("integratedSystem")) { - object.integratedSystem = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.IntegratedSystem[message.integratedSystem] === undefined ? message.integratedSystem : $root.google.cloud.datacatalog.v1beta1.IntegratedSystem[message.integratedSystem] : message.integratedSystem; - if (options.oneofs) - object.system = "integratedSystem"; - } - if (message.userSpecifiedSystem != null && message.hasOwnProperty("userSpecifiedSystem")) { - object.userSpecifiedSystem = message.userSpecifiedSystem; - if (options.oneofs) - object.system = "userSpecifiedSystem"; - } - return object; - }; - - /** - * Converts this Entry to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @instance - * @returns {Object.} JSON object - */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Entry - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.Entry - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.Entry"; - }; - - return Entry; - })(); - - v1beta1.EntryGroup = (function() { - - /** - * Properties of an EntryGroup. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IEntryGroup - * @property {string|null} [name] EntryGroup name - * @property {string|null} [displayName] EntryGroup displayName - * @property {string|null} [description] EntryGroup description - * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [dataCatalogTimestamps] EntryGroup dataCatalogTimestamps - */ - - /** - * Constructs a new EntryGroup. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an EntryGroup. - * @implements IEntryGroup - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IEntryGroup=} [properties] Properties to set - */ - function EntryGroup(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EntryGroup name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @instance - */ - EntryGroup.prototype.name = ""; - - /** - * EntryGroup displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @instance - */ - EntryGroup.prototype.displayName = ""; - - /** - * EntryGroup description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @instance - */ - EntryGroup.prototype.description = ""; - - /** - * EntryGroup dataCatalogTimestamps. - * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} dataCatalogTimestamps - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @instance - */ - EntryGroup.prototype.dataCatalogTimestamps = null; - - /** - * Creates a new EntryGroup instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @static - * @param {google.cloud.datacatalog.v1beta1.IEntryGroup=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup instance - */ - EntryGroup.create = function create(properties) { - return new EntryGroup(properties); - }; - - /** - * Encodes the specified EntryGroup message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @static - * @param {google.cloud.datacatalog.v1beta1.IEntryGroup} message EntryGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntryGroup.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.dataCatalogTimestamps != null && Object.hasOwnProperty.call(message, "dataCatalogTimestamps")) - $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.encode(message.dataCatalogTimestamps, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EntryGroup message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.EntryGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @static - * @param {google.cloud.datacatalog.v1beta1.IEntryGroup} message EntryGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntryGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EntryGroup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntryGroup.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.EntryGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EntryGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntryGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EntryGroup message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntryGroup.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) { - var error = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.verify(message.dataCatalogTimestamps); - if (error) - return "dataCatalogTimestamps." + error; - } - return null; - }; - - /** - * Creates an EntryGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.EntryGroup} EntryGroup - */ - EntryGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.EntryGroup) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.EntryGroup(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.dataCatalogTimestamps != null) { - if (typeof object.dataCatalogTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.EntryGroup.dataCatalogTimestamps: object expected"); - message.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.dataCatalogTimestamps); - } - return message; - }; - - /** - * Creates a plain object from an EntryGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @static - * @param {google.cloud.datacatalog.v1beta1.EntryGroup} message EntryGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntryGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.dataCatalogTimestamps = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.dataCatalogTimestamps != null && message.hasOwnProperty("dataCatalogTimestamps")) - object.dataCatalogTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.toObject(message.dataCatalogTimestamps, options); - return object; - }; - - /** - * Converts this EntryGroup to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @instance - * @returns {Object.} JSON object - */ - EntryGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EntryGroup - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.EntryGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EntryGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.EntryGroup"; - }; - - return EntryGroup; - })(); - - v1beta1.CreateTagTemplateRequest = (function() { - - /** - * Properties of a CreateTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateTagTemplateRequest - * @property {string|null} [parent] CreateTagTemplateRequest parent - * @property {string|null} [tagTemplateId] CreateTagTemplateRequest tagTemplateId - * @property {google.cloud.datacatalog.v1beta1.ITagTemplate|null} [tagTemplate] CreateTagTemplateRequest tagTemplate - */ - - /** - * Constructs a new CreateTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateTagTemplateRequest. - * @implements ICreateTagTemplateRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest=} [properties] Properties to set - */ - function CreateTagTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTagTemplateRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @instance - */ - CreateTagTemplateRequest.prototype.parent = ""; - - /** - * CreateTagTemplateRequest tagTemplateId. - * @member {string} tagTemplateId - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @instance - */ - CreateTagTemplateRequest.prototype.tagTemplateId = ""; - - /** - * CreateTagTemplateRequest tagTemplate. - * @member {google.cloud.datacatalog.v1beta1.ITagTemplate|null|undefined} tagTemplate - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @instance - */ - CreateTagTemplateRequest.prototype.tagTemplate = null; - - /** - * Creates a new CreateTagTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest instance - */ - CreateTagTemplateRequest.create = function create(properties) { - return new CreateTagTemplateRequest(properties); - }; - - /** - * Encodes the specified CreateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} message CreateTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagTemplateRequest.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.tagTemplate != null && Object.hasOwnProperty.call(message, "tagTemplate")) - $root.google.cloud.datacatalog.v1beta1.TagTemplate.encode(message.tagTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tagTemplateId != null && Object.hasOwnProperty.call(message, "tagTemplateId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tagTemplateId); - return writer; - }; - - /** - * Encodes the specified CreateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest} message CreateTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagTemplateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.tagTemplateId = reader.string(); - break; - } - case 2: { - message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTagTemplateRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTagTemplateRequest.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.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) - if (!$util.isString(message.tagTemplateId)) - return "tagTemplateId: string expected"; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplate.verify(message.tagTemplate); - if (error) - return "tagTemplate." + error; - } - return null; - }; - - /** - * Creates a CreateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} CreateTagTemplateRequest - */ - CreateTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tagTemplateId != null) - message.tagTemplateId = String(object.tagTemplateId); - if (object.tagTemplate != null) { - if (typeof object.tagTemplate !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.tagTemplate: object expected"); - message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.fromObject(object.tagTemplate); - } - return message; - }; - - /** - * Creates a plain object from a CreateTagTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest} message CreateTagTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTagTemplateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.tagTemplate = null; - object.tagTemplateId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - object.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.toObject(message.tagTemplate, options); - if (message.tagTemplateId != null && message.hasOwnProperty("tagTemplateId")) - object.tagTemplateId = message.tagTemplateId; - return object; - }; - - /** - * Converts this CreateTagTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTagTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTagTemplateRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTagTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest"; - }; - - return CreateTagTemplateRequest; - })(); - - v1beta1.GetTagTemplateRequest = (function() { - - /** - * Properties of a GetTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGetTagTemplateRequest - * @property {string|null} [name] GetTagTemplateRequest name - */ - - /** - * Constructs a new GetTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GetTagTemplateRequest. - * @implements IGetTagTemplateRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest=} [properties] Properties to set - */ - function GetTagTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTagTemplateRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @instance - */ - GetTagTemplateRequest.prototype.name = ""; - - /** - * Creates a new GetTagTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest instance - */ - GetTagTemplateRequest.create = function create(properties) { - return new GetTagTemplateRequest(properties); - }; - - /** - * Encodes the specified GetTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} message GetTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTagTemplateRequest.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 GetTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTagTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest} message GetTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTagTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTagTemplateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest(); - 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 GetTagTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTagTemplateRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTagTemplateRequest.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 GetTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} GetTagTemplateRequest - */ - GetTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetTagTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.GetTagTemplateRequest} message GetTagTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTagTemplateRequest.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 GetTagTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - GetTagTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetTagTemplateRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.GetTagTemplateRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTagTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.GetTagTemplateRequest"; - }; - - return GetTagTemplateRequest; - })(); - - v1beta1.UpdateTagTemplateRequest = (function() { - - /** - * Properties of an UpdateTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateTagTemplateRequest - * @property {google.cloud.datacatalog.v1beta1.ITagTemplate|null} [tagTemplate] UpdateTagTemplateRequest tagTemplate - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagTemplateRequest updateMask - */ - - /** - * Constructs a new UpdateTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateTagTemplateRequest. - * @implements IUpdateTagTemplateRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest=} [properties] Properties to set - */ - function UpdateTagTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTagTemplateRequest tagTemplate. - * @member {google.cloud.datacatalog.v1beta1.ITagTemplate|null|undefined} tagTemplate - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @instance - */ - UpdateTagTemplateRequest.prototype.tagTemplate = null; - - /** - * UpdateTagTemplateRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @instance - */ - UpdateTagTemplateRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTagTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest instance - */ - UpdateTagTemplateRequest.create = function create(properties) { - return new UpdateTagTemplateRequest(properties); - }; - - /** - * Encodes the specified UpdateTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} message UpdateTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagTemplateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tagTemplate != null && Object.hasOwnProperty.call(message, "tagTemplate")) - $root.google.cloud.datacatalog.v1beta1.TagTemplate.encode(message.tagTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest} message UpdateTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagTemplateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTagTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTagTemplateRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTagTemplateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplate.verify(message.tagTemplate); - if (error) - return "tagTemplate." + 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 UpdateTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} UpdateTagTemplateRequest - */ - UpdateTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest(); - if (object.tagTemplate != null) { - if (typeof object.tagTemplate !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.tagTemplate: object expected"); - message.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.fromObject(object.tagTemplate); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTagTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest} message UpdateTagTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTagTemplateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tagTemplate = null; - object.updateMask = null; - } - if (message.tagTemplate != null && message.hasOwnProperty("tagTemplate")) - object.tagTemplate = $root.google.cloud.datacatalog.v1beta1.TagTemplate.toObject(message.tagTemplate, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateTagTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTagTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTagTemplateRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTagTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest"; - }; - - return UpdateTagTemplateRequest; - })(); - - v1beta1.DeleteTagTemplateRequest = (function() { - - /** - * Properties of a DeleteTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteTagTemplateRequest - * @property {string|null} [name] DeleteTagTemplateRequest name - * @property {boolean|null} [force] DeleteTagTemplateRequest force - */ - - /** - * Constructs a new DeleteTagTemplateRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteTagTemplateRequest. - * @implements IDeleteTagTemplateRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest=} [properties] Properties to set - */ - function DeleteTagTemplateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTagTemplateRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @instance - */ - DeleteTagTemplateRequest.prototype.name = ""; - - /** - * DeleteTagTemplateRequest force. - * @member {boolean} force - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @instance - */ - DeleteTagTemplateRequest.prototype.force = false; - - /** - * Creates a new DeleteTagTemplateRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest instance - */ - DeleteTagTemplateRequest.create = function create(properties) { - return new DeleteTagTemplateRequest(properties); - }; - - /** - * Encodes the specified DeleteTagTemplateRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} message DeleteTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagTemplateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteTagTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest} message DeleteTagTemplateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagTemplateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteTagTemplateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagTemplateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTagTemplateRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTagTemplateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteTagTemplateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} DeleteTagTemplateRequest - */ - DeleteTagTemplateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteTagTemplateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest} message DeleteTagTemplateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTagTemplateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteTagTemplateRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTagTemplateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTagTemplateRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTagTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest"; - }; - - return DeleteTagTemplateRequest; - })(); - - v1beta1.CreateTagRequest = (function() { - - /** - * Properties of a CreateTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateTagRequest - * @property {string|null} [parent] CreateTagRequest parent - * @property {google.cloud.datacatalog.v1beta1.ITag|null} [tag] CreateTagRequest tag - */ - - /** - * Constructs a new CreateTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateTagRequest. - * @implements ICreateTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest=} [properties] Properties to set - */ - function CreateTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTagRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @instance - */ - CreateTagRequest.prototype.parent = ""; - - /** - * CreateTagRequest tag. - * @member {google.cloud.datacatalog.v1beta1.ITag|null|undefined} tag - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @instance - */ - CreateTagRequest.prototype.tag = null; - - /** - * Creates a new CreateTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest instance - */ - CreateTagRequest.create = function create(properties) { - return new CreateTagRequest(properties); - }; - - /** - * Encodes the specified CreateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} message CreateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagRequest.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.tag != null && Object.hasOwnProperty.call(message, "tag")) - $root.google.cloud.datacatalog.v1beta1.Tag.encode(message.tag, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagRequest} message CreateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTagRequest.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.tag != null && message.hasOwnProperty("tag")) { - var error = $root.google.cloud.datacatalog.v1beta1.Tag.verify(message.tag); - if (error) - return "tag." + error; - } - return null; - }; - - /** - * Creates a CreateTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateTagRequest} CreateTagRequest - */ - CreateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateTagRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTagRequest.tag: object expected"); - message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.fromObject(object.tag); - } - return message; - }; - - /** - * Creates a plain object from a CreateTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.CreateTagRequest} message CreateTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.tag = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = $root.google.cloud.datacatalog.v1beta1.Tag.toObject(message.tag, options); - return object; - }; - - /** - * Converts this CreateTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.CreateTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.CreateTagRequest"; - }; - - return CreateTagRequest; - })(); - - v1beta1.UpdateTagRequest = (function() { - - /** - * Properties of an UpdateTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateTagRequest - * @property {google.cloud.datacatalog.v1beta1.ITag|null} [tag] UpdateTagRequest tag - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagRequest updateMask - */ - - /** - * Constructs a new UpdateTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateTagRequest. - * @implements IUpdateTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest=} [properties] Properties to set - */ - function UpdateTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTagRequest tag. - * @member {google.cloud.datacatalog.v1beta1.ITag|null|undefined} tag - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @instance - */ - UpdateTagRequest.prototype.tag = null; - - /** - * UpdateTagRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @instance - */ - UpdateTagRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest instance - */ - UpdateTagRequest.create = function create(properties) { - return new UpdateTagRequest(properties); - }; - - /** - * Encodes the specified UpdateTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - $root.google.cloud.datacatalog.v1beta1.Tag.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagRequest} message UpdateTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTagRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tag != null && message.hasOwnProperty("tag")) { - var error = $root.google.cloud.datacatalog.v1beta1.Tag.verify(message.tag); - if (error) - return "tag." + 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 UpdateTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagRequest} UpdateTagRequest - */ - UpdateTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagRequest(); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagRequest.tag: object expected"); - message.tag = $root.google.cloud.datacatalog.v1beta1.Tag.fromObject(object.tag); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateTagRequest} message UpdateTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.tag = null; - object.updateMask = null; - } - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = $root.google.cloud.datacatalog.v1beta1.Tag.toObject(message.tag, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.UpdateTagRequest"; - }; - - return UpdateTagRequest; - })(); - - v1beta1.DeleteTagRequest = (function() { - - /** - * Properties of a DeleteTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteTagRequest - * @property {string|null} [name] DeleteTagRequest name - */ - - /** - * Constructs a new DeleteTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteTagRequest. - * @implements IDeleteTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest=} [properties] Properties to set - */ - function DeleteTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTagRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @instance - */ - DeleteTagRequest.prototype.name = ""; - - /** - * Creates a new DeleteTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest instance - */ - DeleteTagRequest.create = function create(properties) { - return new DeleteTagRequest(properties); - }; - - /** - * Encodes the specified DeleteTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagRequest.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 DeleteTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagRequest} message DeleteTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest(); - 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 DeleteTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTagRequest.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 DeleteTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagRequest} DeleteTagRequest - */ - DeleteTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteTagRequest} message DeleteTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTagRequest.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 DeleteTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.DeleteTagRequest"; - }; - - return DeleteTagRequest; - })(); - - v1beta1.CreateTagTemplateFieldRequest = (function() { - - /** - * Properties of a CreateTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateTagTemplateFieldRequest - * @property {string|null} [parent] CreateTagTemplateFieldRequest parent - * @property {string|null} [tagTemplateFieldId] CreateTagTemplateFieldRequest tagTemplateFieldId - * @property {google.cloud.datacatalog.v1beta1.ITagTemplateField|null} [tagTemplateField] CreateTagTemplateFieldRequest tagTemplateField - */ - - /** - * Constructs a new CreateTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateTagTemplateFieldRequest. - * @implements ICreateTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest=} [properties] Properties to set - */ - function CreateTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTagTemplateFieldRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @instance - */ - CreateTagTemplateFieldRequest.prototype.parent = ""; - - /** - * CreateTagTemplateFieldRequest tagTemplateFieldId. - * @member {string} tagTemplateFieldId - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @instance - */ - CreateTagTemplateFieldRequest.prototype.tagTemplateFieldId = ""; - - /** - * CreateTagTemplateFieldRequest tagTemplateField. - * @member {google.cloud.datacatalog.v1beta1.ITagTemplateField|null|undefined} tagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @instance - */ - CreateTagTemplateFieldRequest.prototype.tagTemplateField = null; - - /** - * Creates a new CreateTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest instance - */ - CreateTagTemplateFieldRequest.create = function create(properties) { - return new CreateTagTemplateFieldRequest(properties); - }; - - /** - * Encodes the specified CreateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagTemplateFieldRequest.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.tagTemplateFieldId != null && Object.hasOwnProperty.call(message, "tagTemplateFieldId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagTemplateFieldId); - if (message.tagTemplateField != null && Object.hasOwnProperty.call(message, "tagTemplateField")) - $root.google.cloud.datacatalog.v1beta1.TagTemplateField.encode(message.tagTemplateField, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.tagTemplateFieldId = reader.string(); - break; - } - case 3: { - message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTagTemplateFieldRequest.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.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) - if (!$util.isString(message.tagTemplateFieldId)) - return "tagTemplateFieldId: string expected"; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.verify(message.tagTemplateField); - if (error) - return "tagTemplateField." + error; - } - return null; - }; - - /** - * Creates a CreateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} CreateTagTemplateFieldRequest - */ - CreateTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.tagTemplateFieldId != null) - message.tagTemplateFieldId = String(object.tagTemplateFieldId); - if (object.tagTemplateField != null) { - if (typeof object.tagTemplateField !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.tagTemplateField: object expected"); - message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.fromObject(object.tagTemplateField); - } - return message; - }; - - /** - * Creates a plain object from a CreateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest} message CreateTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.tagTemplateFieldId = ""; - object.tagTemplateField = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.tagTemplateFieldId != null && message.hasOwnProperty("tagTemplateFieldId")) - object.tagTemplateFieldId = message.tagTemplateFieldId; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) - object.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.toObject(message.tagTemplateField, options); - return object; - }; - - /** - * Converts this CreateTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTagTemplateFieldRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTagTemplateFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest"; - }; - - return CreateTagTemplateFieldRequest; - })(); - - v1beta1.UpdateTagTemplateFieldRequest = (function() { - - /** - * Properties of an UpdateTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateTagTemplateFieldRequest - * @property {string|null} [name] UpdateTagTemplateFieldRequest name - * @property {google.cloud.datacatalog.v1beta1.ITagTemplateField|null} [tagTemplateField] UpdateTagTemplateFieldRequest tagTemplateField - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTagTemplateFieldRequest updateMask - */ - - /** - * Constructs a new UpdateTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateTagTemplateFieldRequest. - * @implements IUpdateTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest=} [properties] Properties to set - */ - function UpdateTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTagTemplateFieldRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @instance - */ - UpdateTagTemplateFieldRequest.prototype.name = ""; - - /** - * UpdateTagTemplateFieldRequest tagTemplateField. - * @member {google.cloud.datacatalog.v1beta1.ITagTemplateField|null|undefined} tagTemplateField - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @instance - */ - UpdateTagTemplateFieldRequest.prototype.tagTemplateField = null; - - /** - * UpdateTagTemplateFieldRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @instance - */ - UpdateTagTemplateFieldRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest instance - */ - UpdateTagTemplateFieldRequest.create = function create(properties) { - return new UpdateTagTemplateFieldRequest(properties); - }; - - /** - * Encodes the specified UpdateTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagTemplateFieldRequest.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.tagTemplateField != null && Object.hasOwnProperty.call(message, "tagTemplateField")) - $root.google.cloud.datacatalog.v1beta1.TagTemplateField.encode(message.tagTemplateField, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.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 UpdateTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTagTemplateFieldRequest.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.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.verify(message.tagTemplateField); - if (error) - return "tagTemplateField." + 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 UpdateTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} UpdateTagTemplateFieldRequest - */ - UpdateTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.tagTemplateField != null) { - if (typeof object.tagTemplateField !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.tagTemplateField: object expected"); - message.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.fromObject(object.tagTemplateField); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest} message UpdateTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.tagTemplateField = null; - object.updateMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.tagTemplateField != null && message.hasOwnProperty("tagTemplateField")) - object.tagTemplateField = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.toObject(message.tagTemplateField, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTagTemplateFieldRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTagTemplateFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest"; - }; - - return UpdateTagTemplateFieldRequest; - })(); - - v1beta1.RenameTagTemplateFieldRequest = (function() { - - /** - * Properties of a RenameTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IRenameTagTemplateFieldRequest - * @property {string|null} [name] RenameTagTemplateFieldRequest name - * @property {string|null} [newTagTemplateFieldId] RenameTagTemplateFieldRequest newTagTemplateFieldId - */ - - /** - * Constructs a new RenameTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a RenameTagTemplateFieldRequest. - * @implements IRenameTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest=} [properties] Properties to set - */ - function RenameTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RenameTagTemplateFieldRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @instance - */ - RenameTagTemplateFieldRequest.prototype.name = ""; - - /** - * RenameTagTemplateFieldRequest newTagTemplateFieldId. - * @member {string} newTagTemplateFieldId - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @instance - */ - RenameTagTemplateFieldRequest.prototype.newTagTemplateFieldId = ""; - - /** - * Creates a new RenameTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest instance - */ - RenameTagTemplateFieldRequest.create = function create(properties) { - return new RenameTagTemplateFieldRequest(properties); - }; - - /** - * Encodes the specified RenameTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RenameTagTemplateFieldRequest.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.newTagTemplateFieldId != null && Object.hasOwnProperty.call(message, "newTagTemplateFieldId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.newTagTemplateFieldId); - return writer; - }; - - /** - * Encodes the specified RenameTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RenameTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RenameTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.newTagTemplateFieldId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RenameTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RenameTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RenameTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RenameTagTemplateFieldRequest.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.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) - if (!$util.isString(message.newTagTemplateFieldId)) - return "newTagTemplateFieldId: string expected"; - return null; - }; - - /** - * Creates a RenameTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} RenameTagTemplateFieldRequest - */ - RenameTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.newTagTemplateFieldId != null) - message.newTagTemplateFieldId = String(object.newTagTemplateFieldId); - return message; - }; - - /** - * Creates a plain object from a RenameTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest} message RenameTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RenameTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.newTagTemplateFieldId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.newTagTemplateFieldId != null && message.hasOwnProperty("newTagTemplateFieldId")) - object.newTagTemplateFieldId = message.newTagTemplateFieldId; - return object; - }; - - /** - * Converts this RenameTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @instance - * @returns {Object.} JSON object - */ - RenameTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RenameTagTemplateFieldRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RenameTagTemplateFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest"; - }; - - return RenameTagTemplateFieldRequest; - })(); - - v1beta1.DeleteTagTemplateFieldRequest = (function() { - - /** - * Properties of a DeleteTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteTagTemplateFieldRequest - * @property {string|null} [name] DeleteTagTemplateFieldRequest name - * @property {boolean|null} [force] DeleteTagTemplateFieldRequest force - */ - - /** - * Constructs a new DeleteTagTemplateFieldRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteTagTemplateFieldRequest. - * @implements IDeleteTagTemplateFieldRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest=} [properties] Properties to set - */ - function DeleteTagTemplateFieldRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTagTemplateFieldRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @instance - */ - DeleteTagTemplateFieldRequest.prototype.name = ""; - - /** - * DeleteTagTemplateFieldRequest force. - * @member {boolean} force - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @instance - */ - DeleteTagTemplateFieldRequest.prototype.force = false; - - /** - * Creates a new DeleteTagTemplateFieldRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest instance - */ - DeleteTagTemplateFieldRequest.create = function create(properties) { - return new DeleteTagTemplateFieldRequest(properties); - }; - - /** - * Encodes the specified DeleteTagTemplateFieldRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagTemplateFieldRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - return writer; - }; - - /** - * Encodes the specified DeleteTagTemplateFieldRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTagTemplateFieldRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagTemplateFieldRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteTagTemplateFieldRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTagTemplateFieldRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTagTemplateFieldRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTagTemplateFieldRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a DeleteTagTemplateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} DeleteTagTemplateFieldRequest - */ - DeleteTagTemplateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a DeleteTagTemplateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest} message DeleteTagTemplateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTagTemplateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this DeleteTagTemplateFieldRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTagTemplateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTagTemplateFieldRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTagTemplateFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest"; - }; - - return DeleteTagTemplateFieldRequest; - })(); - - v1beta1.ListTagsRequest = (function() { - - /** - * Properties of a ListTagsRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListTagsRequest - * @property {string|null} [parent] ListTagsRequest parent - * @property {number|null} [pageSize] ListTagsRequest pageSize - * @property {string|null} [pageToken] ListTagsRequest pageToken - */ - - /** - * Constructs a new ListTagsRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListTagsRequest. - * @implements IListTagsRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest=} [properties] Properties to set - */ - function ListTagsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTagsRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.parent = ""; - - /** - * ListTagsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.pageSize = 0; - - /** - * ListTagsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @instance - */ - ListTagsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListTagsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest instance - */ - ListTagsRequest.create = function create(properties) { - return new ListTagsRequest(properties); - }; - - /** - * Encodes the specified ListTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} message ListTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsRequest.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 ListTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsRequest} message ListTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTagsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTagsRequest(); - 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 ListTagsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTagsRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTagsRequest.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 ListTagsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListTagsRequest} ListTagsRequest - */ - ListTagsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTagsRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListTagsRequest(); - 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 ListTagsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ListTagsRequest} message ListTagsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTagsRequest.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 ListTagsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @instance - * @returns {Object.} JSON object - */ - ListTagsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTagsRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListTagsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListTagsRequest"; - }; - - return ListTagsRequest; - })(); - - v1beta1.ListTagsResponse = (function() { - - /** - * Properties of a ListTagsResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListTagsResponse - * @property {Array.|null} [tags] ListTagsResponse tags - * @property {string|null} [nextPageToken] ListTagsResponse nextPageToken - */ - - /** - * Constructs a new ListTagsResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListTagsResponse. - * @implements IListTagsResponse - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse=} [properties] Properties to set - */ - function ListTagsResponse(properties) { - 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]]; - } - - /** - * ListTagsResponse tags. - * @member {Array.} tags - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @instance - */ - ListTagsResponse.prototype.tags = $util.emptyArray; - - /** - * ListTagsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @instance - */ - ListTagsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTagsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse instance - */ - ListTagsResponse.create = function create(properties) { - return new ListTagsResponse(properties); - }; - - /** - * Encodes the specified ListTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse} message ListTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - $root.google.cloud.datacatalog.v1beta1.Tag.encode(message.tags[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 ListTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTagsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTagsResponse} message ListTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTagsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push($root.google.cloud.datacatalog.v1beta1.Tag.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTagsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTagsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTagsResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTagsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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) { - var error = $root.google.cloud.datacatalog.v1beta1.Tag.verify(message.tags[i]); - if (error) - return "tags." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListTagsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListTagsResponse} ListTagsResponse - */ - ListTagsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTagsResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListTagsResponse(); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ListTagsResponse.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) { - if (typeof object.tags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ListTagsResponse.tags: object expected"); - message.tags[i] = $root.google.cloud.datacatalog.v1beta1.Tag.fromObject(object.tags[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListTagsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ListTagsResponse} message ListTagsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTagsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.tags = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = $root.google.cloud.datacatalog.v1beta1.Tag.toObject(message.tags[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListTagsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @instance - * @returns {Object.} JSON object - */ - ListTagsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTagsResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListTagsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListTagsResponse"; - }; - - return ListTagsResponse; - })(); - - v1beta1.ListEntriesRequest = (function() { - - /** - * Properties of a ListEntriesRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListEntriesRequest - * @property {string|null} [parent] ListEntriesRequest parent - * @property {number|null} [pageSize] ListEntriesRequest pageSize - * @property {string|null} [pageToken] ListEntriesRequest pageToken - * @property {google.protobuf.IFieldMask|null} [readMask] ListEntriesRequest readMask - */ - - /** - * Constructs a new ListEntriesRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListEntriesRequest. - * @implements IListEntriesRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListEntriesRequest=} [properties] Properties to set - */ - function ListEntriesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntriesRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.parent = ""; - - /** - * ListEntriesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.pageSize = 0; - - /** - * ListEntriesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.pageToken = ""; - - /** - * ListEntriesRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @instance - */ - ListEntriesRequest.prototype.readMask = null; - - /** - * Creates a new ListEntriesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntriesRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListEntriesRequest} ListEntriesRequest instance - */ - ListEntriesRequest.create = function create(properties) { - return new ListEntriesRequest(properties); - }; - - /** - * Encodes the specified ListEntriesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntriesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntriesRequest} message ListEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntriesRequest.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.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListEntriesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntriesRequest} message ListEntriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntriesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListEntriesRequest} ListEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntriesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListEntriesRequest(); - 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.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListEntriesRequest} ListEntriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntriesRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntriesRequest.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.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - return null; - }; - - /** - * Creates a ListEntriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListEntriesRequest} ListEntriesRequest - */ - ListEntriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListEntriesRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListEntriesRequest(); - 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.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ListEntriesRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - return message; - }; - - /** - * Creates a plain object from a ListEntriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ListEntriesRequest} message ListEntriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.readMask = null; - } - 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.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - return object; - }; - - /** - * Converts this ListEntriesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @instance - * @returns {Object.} JSON object - */ - ListEntriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntriesRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListEntriesRequest"; - }; - - return ListEntriesRequest; - })(); - - v1beta1.ListEntriesResponse = (function() { - - /** - * Properties of a ListEntriesResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListEntriesResponse - * @property {Array.|null} [entries] ListEntriesResponse entries - * @property {string|null} [nextPageToken] ListEntriesResponse nextPageToken - */ - - /** - * Constructs a new ListEntriesResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListEntriesResponse. - * @implements IListEntriesResponse - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListEntriesResponse=} [properties] Properties to set - */ - function ListEntriesResponse(properties) { - this.entries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEntriesResponse entries. - * @member {Array.} entries - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @instance - */ - ListEntriesResponse.prototype.entries = $util.emptyArray; - - /** - * ListEntriesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @instance - */ - ListEntriesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEntriesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntriesResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListEntriesResponse} ListEntriesResponse instance - */ - ListEntriesResponse.create = function create(properties) { - return new ListEntriesResponse(properties); - }; - - /** - * Encodes the specified ListEntriesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntriesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntriesResponse} message ListEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.google.cloud.datacatalog.v1beta1.Entry.encode(message.entries[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 ListEntriesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListEntriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListEntriesResponse} message ListEntriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEntriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEntriesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListEntriesResponse} ListEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntriesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListEntriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.google.cloud.datacatalog.v1beta1.Entry.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEntriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListEntriesResponse} ListEntriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEntriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEntriesResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEntriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.Entry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEntriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListEntriesResponse} ListEntriesResponse - */ - ListEntriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListEntriesResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListEntriesResponse(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ListEntriesResponse.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ListEntriesResponse.entries: object expected"); - message.entries[i] = $root.google.cloud.datacatalog.v1beta1.Entry.fromObject(object.entries[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEntriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ListEntriesResponse} message ListEntriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEntriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.google.cloud.datacatalog.v1beta1.Entry.toObject(message.entries[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEntriesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @instance - * @returns {Object.} JSON object - */ - ListEntriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEntriesResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListEntriesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEntriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListEntriesResponse"; - }; - - return ListEntriesResponse; - })(); - - /** - * EntryType enum. - * @name google.cloud.datacatalog.v1beta1.EntryType - * @enum {number} - * @property {number} ENTRY_TYPE_UNSPECIFIED=0 ENTRY_TYPE_UNSPECIFIED value - * @property {number} TABLE=2 TABLE value - * @property {number} MODEL=5 MODEL value - * @property {number} DATA_STREAM=3 DATA_STREAM value - * @property {number} FILESET=4 FILESET value - */ - v1beta1.EntryType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTRY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "TABLE"] = 2; - values[valuesById[5] = "MODEL"] = 5; - values[valuesById[3] = "DATA_STREAM"] = 3; - values[valuesById[4] = "FILESET"] = 4; - return values; - })(); - - v1beta1.GcsFilesetSpec = (function() { - - /** - * Properties of a GcsFilesetSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGcsFilesetSpec - * @property {Array.|null} [filePatterns] GcsFilesetSpec filePatterns - * @property {Array.|null} [sampleGcsFileSpecs] GcsFilesetSpec sampleGcsFileSpecs - */ - - /** - * Constructs a new GcsFilesetSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GcsFilesetSpec. - * @implements IGcsFilesetSpec - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec=} [properties] Properties to set - */ - function GcsFilesetSpec(properties) { - this.filePatterns = []; - this.sampleGcsFileSpecs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcsFilesetSpec filePatterns. - * @member {Array.} filePatterns - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @instance - */ - GcsFilesetSpec.prototype.filePatterns = $util.emptyArray; - - /** - * GcsFilesetSpec sampleGcsFileSpecs. - * @member {Array.} sampleGcsFileSpecs - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @instance - */ - GcsFilesetSpec.prototype.sampleGcsFileSpecs = $util.emptyArray; - - /** - * Creates a new GcsFilesetSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec instance - */ - GcsFilesetSpec.create = function create(properties) { - return new GcsFilesetSpec(properties); - }; - - /** - * Encodes the specified GcsFilesetSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec} message GcsFilesetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFilesetSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filePatterns != null && message.filePatterns.length) - for (var i = 0; i < message.filePatterns.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePatterns[i]); - if (message.sampleGcsFileSpecs != null && message.sampleGcsFileSpecs.length) - for (var i = 0; i < message.sampleGcsFileSpecs.length; ++i) - $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.encode(message.sampleGcsFileSpecs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GcsFilesetSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFilesetSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFilesetSpec} message GcsFilesetSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFilesetSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFilesetSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.filePatterns && message.filePatterns.length)) - message.filePatterns = []; - message.filePatterns.push(reader.string()); - break; - } - case 2: { - if (!(message.sampleGcsFileSpecs && message.sampleGcsFileSpecs.length)) - message.sampleGcsFileSpecs = []; - message.sampleGcsFileSpecs.push($root.google.cloud.datacatalog.v1beta1.GcsFileSpec.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsFilesetSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFilesetSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsFilesetSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsFilesetSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filePatterns != null && message.hasOwnProperty("filePatterns")) { - if (!Array.isArray(message.filePatterns)) - return "filePatterns: array expected"; - for (var i = 0; i < message.filePatterns.length; ++i) - if (!$util.isString(message.filePatterns[i])) - return "filePatterns: string[] expected"; - } - if (message.sampleGcsFileSpecs != null && message.hasOwnProperty("sampleGcsFileSpecs")) { - if (!Array.isArray(message.sampleGcsFileSpecs)) - return "sampleGcsFileSpecs: array expected"; - for (var i = 0; i < message.sampleGcsFileSpecs.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.verify(message.sampleGcsFileSpecs[i]); - if (error) - return "sampleGcsFileSpecs." + error; - } - } - return null; - }; - - /** - * Creates a GcsFilesetSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} GcsFilesetSpec - */ - GcsFilesetSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GcsFilesetSpec(); - if (object.filePatterns) { - if (!Array.isArray(object.filePatterns)) - throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFilesetSpec.filePatterns: array expected"); - message.filePatterns = []; - for (var i = 0; i < object.filePatterns.length; ++i) - message.filePatterns[i] = String(object.filePatterns[i]); - } - if (object.sampleGcsFileSpecs) { - if (!Array.isArray(object.sampleGcsFileSpecs)) - throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFilesetSpec.sampleGcsFileSpecs: array expected"); - message.sampleGcsFileSpecs = []; - for (var i = 0; i < object.sampleGcsFileSpecs.length; ++i) { - if (typeof object.sampleGcsFileSpecs[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFilesetSpec.sampleGcsFileSpecs: object expected"); - message.sampleGcsFileSpecs[i] = $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.fromObject(object.sampleGcsFileSpecs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GcsFilesetSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.GcsFilesetSpec} message GcsFilesetSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsFilesetSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.filePatterns = []; - object.sampleGcsFileSpecs = []; - } - if (message.filePatterns && message.filePatterns.length) { - object.filePatterns = []; - for (var j = 0; j < message.filePatterns.length; ++j) - object.filePatterns[j] = message.filePatterns[j]; - } - if (message.sampleGcsFileSpecs && message.sampleGcsFileSpecs.length) { - object.sampleGcsFileSpecs = []; - for (var j = 0; j < message.sampleGcsFileSpecs.length; ++j) - object.sampleGcsFileSpecs[j] = $root.google.cloud.datacatalog.v1beta1.GcsFileSpec.toObject(message.sampleGcsFileSpecs[j], options); - } - return object; - }; - - /** - * Converts this GcsFilesetSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @instance - * @returns {Object.} JSON object - */ - GcsFilesetSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsFilesetSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.GcsFilesetSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsFilesetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.GcsFilesetSpec"; - }; - - return GcsFilesetSpec; - })(); - - v1beta1.GcsFileSpec = (function() { - - /** - * Properties of a GcsFileSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGcsFileSpec - * @property {string|null} [filePath] GcsFileSpec filePath - * @property {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null} [gcsTimestamps] GcsFileSpec gcsTimestamps - * @property {number|Long|null} [sizeBytes] GcsFileSpec sizeBytes - */ - - /** - * Constructs a new GcsFileSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GcsFileSpec. - * @implements IGcsFileSpec - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec=} [properties] Properties to set - */ - function GcsFileSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcsFileSpec filePath. - * @member {string} filePath - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @instance - */ - GcsFileSpec.prototype.filePath = ""; - - /** - * GcsFileSpec gcsTimestamps. - * @member {google.cloud.datacatalog.v1beta1.ISystemTimestamps|null|undefined} gcsTimestamps - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @instance - */ - GcsFileSpec.prototype.gcsTimestamps = null; - - /** - * GcsFileSpec sizeBytes. - * @member {number|Long} sizeBytes - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @instance - */ - GcsFileSpec.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new GcsFileSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec instance - */ - GcsFileSpec.create = function create(properties) { - return new GcsFileSpec(properties); - }; - - /** - * Encodes the specified GcsFileSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec} message GcsFileSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFileSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.filePath != null && Object.hasOwnProperty.call(message, "filePath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filePath); - if (message.gcsTimestamps != null && Object.hasOwnProperty.call(message, "gcsTimestamps")) - $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.encode(message.gcsTimestamps, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sizeBytes != null && Object.hasOwnProperty.call(message, "sizeBytes")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.sizeBytes); - return writer; - }; - - /** - * Encodes the specified GcsFileSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GcsFileSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IGcsFileSpec} message GcsFileSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsFileSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsFileSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFileSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GcsFileSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.filePath = reader.string(); - break; - } - case 2: { - message.gcsTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.decode(reader, reader.uint32()); - break; - } - case 4: { - message.sizeBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsFileSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsFileSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsFileSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsFileSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.filePath != null && message.hasOwnProperty("filePath")) - if (!$util.isString(message.filePath)) - return "filePath: string expected"; - if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) { - var error = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.verify(message.gcsTimestamps); - if (error) - return "gcsTimestamps." + error; - } - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high))) - return "sizeBytes: integer|Long expected"; - return null; - }; - - /** - * Creates a GcsFileSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GcsFileSpec} GcsFileSpec - */ - GcsFileSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GcsFileSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GcsFileSpec(); - if (object.filePath != null) - message.filePath = String(object.filePath); - if (object.gcsTimestamps != null) { - if (typeof object.gcsTimestamps !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.GcsFileSpec.gcsTimestamps: object expected"); - message.gcsTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.fromObject(object.gcsTimestamps); - } - if (object.sizeBytes != null) - if ($util.Long) - (message.sizeBytes = $util.Long.fromValue(object.sizeBytes)).unsigned = false; - else if (typeof object.sizeBytes === "string") - message.sizeBytes = parseInt(object.sizeBytes, 10); - else if (typeof object.sizeBytes === "number") - message.sizeBytes = object.sizeBytes; - else if (typeof object.sizeBytes === "object") - message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a GcsFileSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.GcsFileSpec} message GcsFileSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsFileSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filePath = ""; - object.gcsTimestamps = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.sizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sizeBytes = options.longs === String ? "0" : 0; - } - if (message.filePath != null && message.hasOwnProperty("filePath")) - object.filePath = message.filePath; - if (message.gcsTimestamps != null && message.hasOwnProperty("gcsTimestamps")) - object.gcsTimestamps = $root.google.cloud.datacatalog.v1beta1.SystemTimestamps.toObject(message.gcsTimestamps, options); - if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes")) - if (typeof message.sizeBytes === "number") - object.sizeBytes = options.longs === String ? String(message.sizeBytes) : message.sizeBytes; - else - object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; - return object; - }; - - /** - * Converts this GcsFileSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @instance - * @returns {Object.} JSON object - */ - GcsFileSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsFileSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.GcsFileSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsFileSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.GcsFileSpec"; - }; - - return GcsFileSpec; - })(); - - v1beta1.SystemTimestamps = (function() { - - /** - * Properties of a SystemTimestamps. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISystemTimestamps - * @property {google.protobuf.ITimestamp|null} [createTime] SystemTimestamps createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] SystemTimestamps updateTime - * @property {google.protobuf.ITimestamp|null} [expireTime] SystemTimestamps expireTime - */ - - /** - * Constructs a new SystemTimestamps. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SystemTimestamps. - * @implements ISystemTimestamps - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps=} [properties] Properties to set - */ - function SystemTimestamps(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SystemTimestamps createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @instance - */ - SystemTimestamps.prototype.createTime = null; - - /** - * SystemTimestamps updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @instance - */ - SystemTimestamps.prototype.updateTime = null; - - /** - * SystemTimestamps expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @instance - */ - SystemTimestamps.prototype.expireTime = null; - - /** - * Creates a new SystemTimestamps instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @static - * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps instance - */ - SystemTimestamps.create = function create(properties) { - return new SystemTimestamps(properties); - }; - - /** - * Encodes the specified SystemTimestamps message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @static - * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps} message SystemTimestamps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SystemTimestamps.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SystemTimestamps message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SystemTimestamps.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @static - * @param {google.cloud.datacatalog.v1beta1.ISystemTimestamps} message SystemTimestamps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SystemTimestamps.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SystemTimestamps message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SystemTimestamps.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SystemTimestamps(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SystemTimestamps message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SystemTimestamps.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SystemTimestamps message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SystemTimestamps.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - return null; - }; - - /** - * Creates a SystemTimestamps message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SystemTimestamps} SystemTimestamps - */ - SystemTimestamps.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SystemTimestamps) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SystemTimestamps(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SystemTimestamps.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.datacatalog.v1beta1.SystemTimestamps.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SystemTimestamps.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - return message; - }; - - /** - * Creates a plain object from a SystemTimestamps message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @static - * @param {google.cloud.datacatalog.v1beta1.SystemTimestamps} message SystemTimestamps - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SystemTimestamps.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.updateTime = null; - object.expireTime = null; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - return object; - }; - - /** - * Converts this SystemTimestamps to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @instance - * @returns {Object.} JSON object - */ - SystemTimestamps.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SystemTimestamps - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.SystemTimestamps - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SystemTimestamps.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.SystemTimestamps"; - }; - - return SystemTimestamps; - })(); - - v1beta1.Schema = (function() { - - /** - * Properties of a Schema. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISchema - * @property {Array.|null} [columns] Schema columns - */ - - /** - * Constructs a new Schema. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a Schema. - * @implements ISchema - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISchema=} [properties] Properties to set - */ - function Schema(properties) { - this.columns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Schema columns. - * @member {Array.} columns - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @instance - */ - Schema.prototype.columns = $util.emptyArray; - - /** - * Creates a new Schema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @static - * @param {google.cloud.datacatalog.v1beta1.ISchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema instance - */ - Schema.create = function create(properties) { - return new Schema(properties); - }; - - /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @static - * @param {google.cloud.datacatalog.v1beta1.ISchema} message Schema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.cloud.datacatalog.v1beta1.ColumnSchema.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Schema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @static - * @param {google.cloud.datacatalog.v1beta1.ISchema} message Schema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Schema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Schema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.datacatalog.v1beta1.ColumnSchema.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Schema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Schema message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Schema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - return null; - }; - - /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.Schema} Schema - */ - Schema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.Schema) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.Schema(); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.cloud.datacatalog.v1beta1.Schema.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Schema.columns: object expected"); - message.columns[i] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.fromObject(object.columns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @static - * @param {google.cloud.datacatalog.v1beta1.Schema} message Schema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Schema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.columns = []; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.toObject(message.columns[j], options); - } - return object; - }; - - /** - * Converts this Schema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @instance - * @returns {Object.} JSON object - */ - Schema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Schema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.Schema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.Schema"; - }; - - return Schema; - })(); - - v1beta1.ColumnSchema = (function() { - - /** - * Properties of a ColumnSchema. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IColumnSchema - * @property {string|null} [column] ColumnSchema column - * @property {string|null} [type] ColumnSchema type - * @property {string|null} [description] ColumnSchema description - * @property {string|null} [mode] ColumnSchema mode - * @property {Array.|null} [subcolumns] ColumnSchema subcolumns - */ - - /** - * Constructs a new ColumnSchema. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ColumnSchema. - * @implements IColumnSchema - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IColumnSchema=} [properties] Properties to set - */ - function ColumnSchema(properties) { - this.subcolumns = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ColumnSchema column. - * @member {string} column - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.column = ""; - - /** - * ColumnSchema type. - * @member {string} type - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.type = ""; - - /** - * ColumnSchema description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.description = ""; - - /** - * ColumnSchema mode. - * @member {string} mode - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.mode = ""; - - /** - * ColumnSchema subcolumns. - * @member {Array.} subcolumns - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - */ - ColumnSchema.prototype.subcolumns = $util.emptyArray; - - /** - * Creates a new ColumnSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @static - * @param {google.cloud.datacatalog.v1beta1.IColumnSchema=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema instance - */ - ColumnSchema.create = function create(properties) { - return new ColumnSchema(properties); - }; - - /** - * Encodes the specified ColumnSchema message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @static - * @param {google.cloud.datacatalog.v1beta1.IColumnSchema} message ColumnSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnSchema.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mode); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.column); - if (message.subcolumns != null && message.subcolumns.length) - for (var i = 0; i < message.subcolumns.length; ++i) - $root.google.cloud.datacatalog.v1beta1.ColumnSchema.encode(message.subcolumns[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ColumnSchema message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ColumnSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @static - * @param {google.cloud.datacatalog.v1beta1.IColumnSchema} message ColumnSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ColumnSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ColumnSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnSchema.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ColumnSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: { - message.column = reader.string(); - break; - } - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.mode = reader.string(); - break; - } - case 7: { - if (!(message.subcolumns && message.subcolumns.length)) - message.subcolumns = []; - message.subcolumns.push($root.google.cloud.datacatalog.v1beta1.ColumnSchema.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ColumnSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ColumnSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ColumnSchema message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ColumnSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - if (!$util.isString(message.mode)) - return "mode: string expected"; - if (message.subcolumns != null && message.hasOwnProperty("subcolumns")) { - if (!Array.isArray(message.subcolumns)) - return "subcolumns: array expected"; - for (var i = 0; i < message.subcolumns.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.verify(message.subcolumns[i]); - if (error) - return "subcolumns." + error; - } - } - return null; - }; - - /** - * Creates a ColumnSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ColumnSchema} ColumnSchema - */ - ColumnSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ColumnSchema) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ColumnSchema(); - if (object.column != null) - message.column = String(object.column); - if (object.type != null) - message.type = String(object.type); - if (object.description != null) - message.description = String(object.description); - if (object.mode != null) - message.mode = String(object.mode); - if (object.subcolumns) { - if (!Array.isArray(object.subcolumns)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ColumnSchema.subcolumns: array expected"); - message.subcolumns = []; - for (var i = 0; i < object.subcolumns.length; ++i) { - if (typeof object.subcolumns[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ColumnSchema.subcolumns: object expected"); - message.subcolumns[i] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.fromObject(object.subcolumns[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ColumnSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @static - * @param {google.cloud.datacatalog.v1beta1.ColumnSchema} message ColumnSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ColumnSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.subcolumns = []; - if (options.defaults) { - object.type = ""; - object.description = ""; - object.mode = ""; - object.column = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = message.mode; - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.subcolumns && message.subcolumns.length) { - object.subcolumns = []; - for (var j = 0; j < message.subcolumns.length; ++j) - object.subcolumns[j] = $root.google.cloud.datacatalog.v1beta1.ColumnSchema.toObject(message.subcolumns[j], options); - } - return object; - }; - - /** - * Converts this ColumnSchema to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @instance - * @returns {Object.} JSON object - */ - ColumnSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ColumnSchema - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ColumnSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ColumnSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ColumnSchema"; - }; - - return ColumnSchema; - })(); - - v1beta1.SearchCatalogResult = (function() { - - /** - * Properties of a SearchCatalogResult. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISearchCatalogResult - * @property {google.cloud.datacatalog.v1beta1.SearchResultType|null} [searchResultType] SearchCatalogResult searchResultType - * @property {string|null} [searchResultSubtype] SearchCatalogResult searchResultSubtype - * @property {string|null} [relativeResourceName] SearchCatalogResult relativeResourceName - * @property {string|null} [linkedResource] SearchCatalogResult linkedResource - */ - - /** - * Constructs a new SearchCatalogResult. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SearchCatalogResult. - * @implements ISearchCatalogResult - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult=} [properties] Properties to set - */ - function SearchCatalogResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchCatalogResult searchResultType. - * @member {google.cloud.datacatalog.v1beta1.SearchResultType} searchResultType - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.searchResultType = 0; - - /** - * SearchCatalogResult searchResultSubtype. - * @member {string} searchResultSubtype - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.searchResultSubtype = ""; - - /** - * SearchCatalogResult relativeResourceName. - * @member {string} relativeResourceName - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.relativeResourceName = ""; - - /** - * SearchCatalogResult linkedResource. - * @member {string} linkedResource - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @instance - */ - SearchCatalogResult.prototype.linkedResource = ""; - - /** - * Creates a new SearchCatalogResult instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult instance - */ - SearchCatalogResult.create = function create(properties) { - return new SearchCatalogResult(properties); - }; - - /** - * Encodes the specified SearchCatalogResult message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult} message SearchCatalogResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.searchResultType != null && Object.hasOwnProperty.call(message, "searchResultType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.searchResultType); - if (message.searchResultSubtype != null && Object.hasOwnProperty.call(message, "searchResultSubtype")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.searchResultSubtype); - if (message.relativeResourceName != null && Object.hasOwnProperty.call(message, "relativeResourceName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relativeResourceName); - if (message.linkedResource != null && Object.hasOwnProperty.call(message, "linkedResource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.linkedResource); - return writer; - }; - - /** - * Encodes the specified SearchCatalogResult message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SearchCatalogResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @static - * @param {google.cloud.datacatalog.v1beta1.ISearchCatalogResult} message SearchCatalogResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchCatalogResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchCatalogResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.searchResultType = reader.int32(); - break; - } - case 2: { - message.searchResultSubtype = reader.string(); - break; - } - case 3: { - message.relativeResourceName = reader.string(); - break; - } - case 4: { - message.linkedResource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchCatalogResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchCatalogResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchCatalogResult message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchCatalogResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) - switch (message.searchResultType) { - default: - return "searchResultType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) - if (!$util.isString(message.searchResultSubtype)) - return "searchResultSubtype: string expected"; - if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) - if (!$util.isString(message.relativeResourceName)) - return "relativeResourceName: string expected"; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - if (!$util.isString(message.linkedResource)) - return "linkedResource: string expected"; - return null; - }; - - /** - * Creates a SearchCatalogResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SearchCatalogResult} SearchCatalogResult - */ - SearchCatalogResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SearchCatalogResult(); - switch (object.searchResultType) { - default: - if (typeof object.searchResultType === "number") { - message.searchResultType = object.searchResultType; - break; - } - break; - case "SEARCH_RESULT_TYPE_UNSPECIFIED": - case 0: - message.searchResultType = 0; - break; - case "ENTRY": - case 1: - message.searchResultType = 1; - break; - case "TAG_TEMPLATE": - case 2: - message.searchResultType = 2; - break; - case "ENTRY_GROUP": - case 3: - message.searchResultType = 3; - break; - } - if (object.searchResultSubtype != null) - message.searchResultSubtype = String(object.searchResultSubtype); - if (object.relativeResourceName != null) - message.relativeResourceName = String(object.relativeResourceName); - if (object.linkedResource != null) - message.linkedResource = String(object.linkedResource); - return message; - }; - - /** - * Creates a plain object from a SearchCatalogResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @static - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogResult} message SearchCatalogResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchCatalogResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.searchResultType = options.enums === String ? "SEARCH_RESULT_TYPE_UNSPECIFIED" : 0; - object.searchResultSubtype = ""; - object.relativeResourceName = ""; - object.linkedResource = ""; - } - if (message.searchResultType != null && message.hasOwnProperty("searchResultType")) - object.searchResultType = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.SearchResultType[message.searchResultType] === undefined ? message.searchResultType : $root.google.cloud.datacatalog.v1beta1.SearchResultType[message.searchResultType] : message.searchResultType; - if (message.searchResultSubtype != null && message.hasOwnProperty("searchResultSubtype")) - object.searchResultSubtype = message.searchResultSubtype; - if (message.relativeResourceName != null && message.hasOwnProperty("relativeResourceName")) - object.relativeResourceName = message.relativeResourceName; - if (message.linkedResource != null && message.hasOwnProperty("linkedResource")) - object.linkedResource = message.linkedResource; - return object; - }; - - /** - * Converts this SearchCatalogResult to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @instance - * @returns {Object.} JSON object - */ - SearchCatalogResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchCatalogResult - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.SearchCatalogResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchCatalogResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.SearchCatalogResult"; - }; - - return SearchCatalogResult; - })(); - - /** - * SearchResultType enum. - * @name google.cloud.datacatalog.v1beta1.SearchResultType - * @enum {number} - * @property {number} SEARCH_RESULT_TYPE_UNSPECIFIED=0 SEARCH_RESULT_TYPE_UNSPECIFIED value - * @property {number} ENTRY=1 ENTRY value - * @property {number} TAG_TEMPLATE=2 TAG_TEMPLATE value - * @property {number} ENTRY_GROUP=3 ENTRY_GROUP value - */ - v1beta1.SearchResultType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEARCH_RESULT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENTRY"] = 1; - values[valuesById[2] = "TAG_TEMPLATE"] = 2; - values[valuesById[3] = "ENTRY_GROUP"] = 3; - return values; - })(); - - v1beta1.BigQueryTableSpec = (function() { - - /** - * Properties of a BigQueryTableSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IBigQueryTableSpec - * @property {google.cloud.datacatalog.v1beta1.TableSourceType|null} [tableSourceType] BigQueryTableSpec tableSourceType - * @property {google.cloud.datacatalog.v1beta1.IViewSpec|null} [viewSpec] BigQueryTableSpec viewSpec - * @property {google.cloud.datacatalog.v1beta1.ITableSpec|null} [tableSpec] BigQueryTableSpec tableSpec - */ - - /** - * Constructs a new BigQueryTableSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a BigQueryTableSpec. - * @implements IBigQueryTableSpec - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec=} [properties] Properties to set - */ - function BigQueryTableSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryTableSpec tableSourceType. - * @member {google.cloud.datacatalog.v1beta1.TableSourceType} tableSourceType - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @instance - */ - BigQueryTableSpec.prototype.tableSourceType = 0; - - /** - * BigQueryTableSpec viewSpec. - * @member {google.cloud.datacatalog.v1beta1.IViewSpec|null|undefined} viewSpec - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @instance - */ - BigQueryTableSpec.prototype.viewSpec = null; - - /** - * BigQueryTableSpec tableSpec. - * @member {google.cloud.datacatalog.v1beta1.ITableSpec|null|undefined} tableSpec - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @instance - */ - BigQueryTableSpec.prototype.tableSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BigQueryTableSpec typeSpec. - * @member {"viewSpec"|"tableSpec"|undefined} typeSpec - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @instance - */ - Object.defineProperty(BigQueryTableSpec.prototype, "typeSpec", { - get: $util.oneOfGetter($oneOfFields = ["viewSpec", "tableSpec"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BigQueryTableSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec instance - */ - BigQueryTableSpec.create = function create(properties) { - return new BigQueryTableSpec(properties); - }; - - /** - * Encodes the specified BigQueryTableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec} message BigQueryTableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryTableSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tableSourceType != null && Object.hasOwnProperty.call(message, "tableSourceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tableSourceType); - if (message.viewSpec != null && Object.hasOwnProperty.call(message, "viewSpec")) - $root.google.cloud.datacatalog.v1beta1.ViewSpec.encode(message.viewSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tableSpec != null && Object.hasOwnProperty.call(message, "tableSpec")) - $root.google.cloud.datacatalog.v1beta1.TableSpec.encode(message.tableSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BigQueryTableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryTableSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryTableSpec} message BigQueryTableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryTableSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryTableSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tableSourceType = reader.int32(); - break; - } - case 2: { - message.viewSpec = $root.google.cloud.datacatalog.v1beta1.ViewSpec.decode(reader, reader.uint32()); - break; - } - case 3: { - message.tableSpec = $root.google.cloud.datacatalog.v1beta1.TableSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryTableSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryTableSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryTableSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryTableSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) - switch (message.tableSourceType) { - default: - return "tableSourceType: enum value expected"; - case 0: - case 2: - case 5: - break; - } - if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) { - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.ViewSpec.verify(message.viewSpec); - if (error) - return "viewSpec." + error; - } - } - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { - if (properties.typeSpec === 1) - return "typeSpec: multiple values"; - properties.typeSpec = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.TableSpec.verify(message.tableSpec); - if (error) - return "tableSpec." + error; - } - } - return null; - }; - - /** - * Creates a BigQueryTableSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} BigQueryTableSpec - */ - BigQueryTableSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.BigQueryTableSpec(); - switch (object.tableSourceType) { - default: - if (typeof object.tableSourceType === "number") { - message.tableSourceType = object.tableSourceType; - break; - } - break; - case "TABLE_SOURCE_TYPE_UNSPECIFIED": - case 0: - message.tableSourceType = 0; - break; - case "BIGQUERY_VIEW": - case 2: - message.tableSourceType = 2; - break; - case "BIGQUERY_TABLE": - case 5: - message.tableSourceType = 5; - break; - } - if (object.viewSpec != null) { - if (typeof object.viewSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.BigQueryTableSpec.viewSpec: object expected"); - message.viewSpec = $root.google.cloud.datacatalog.v1beta1.ViewSpec.fromObject(object.viewSpec); - } - if (object.tableSpec != null) { - if (typeof object.tableSpec !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.BigQueryTableSpec.tableSpec: object expected"); - message.tableSpec = $root.google.cloud.datacatalog.v1beta1.TableSpec.fromObject(object.tableSpec); - } - return message; - }; - - /** - * Creates a plain object from a BigQueryTableSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.BigQueryTableSpec} message BigQueryTableSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryTableSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tableSourceType = options.enums === String ? "TABLE_SOURCE_TYPE_UNSPECIFIED" : 0; - if (message.tableSourceType != null && message.hasOwnProperty("tableSourceType")) - object.tableSourceType = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.TableSourceType[message.tableSourceType] === undefined ? message.tableSourceType : $root.google.cloud.datacatalog.v1beta1.TableSourceType[message.tableSourceType] : message.tableSourceType; - if (message.viewSpec != null && message.hasOwnProperty("viewSpec")) { - object.viewSpec = $root.google.cloud.datacatalog.v1beta1.ViewSpec.toObject(message.viewSpec, options); - if (options.oneofs) - object.typeSpec = "viewSpec"; - } - if (message.tableSpec != null && message.hasOwnProperty("tableSpec")) { - object.tableSpec = $root.google.cloud.datacatalog.v1beta1.TableSpec.toObject(message.tableSpec, options); - if (options.oneofs) - object.typeSpec = "tableSpec"; - } - return object; - }; - - /** - * Converts this BigQueryTableSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @instance - * @returns {Object.} JSON object - */ - BigQueryTableSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryTableSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.BigQueryTableSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryTableSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.BigQueryTableSpec"; - }; - - return BigQueryTableSpec; - })(); - - /** - * TableSourceType enum. - * @name google.cloud.datacatalog.v1beta1.TableSourceType - * @enum {number} - * @property {number} TABLE_SOURCE_TYPE_UNSPECIFIED=0 TABLE_SOURCE_TYPE_UNSPECIFIED value - * @property {number} BIGQUERY_VIEW=2 BIGQUERY_VIEW value - * @property {number} BIGQUERY_TABLE=5 BIGQUERY_TABLE value - */ - v1beta1.TableSourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TABLE_SOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "BIGQUERY_VIEW"] = 2; - values[valuesById[5] = "BIGQUERY_TABLE"] = 5; - return values; - })(); - - v1beta1.ViewSpec = (function() { - - /** - * Properties of a ViewSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IViewSpec - * @property {string|null} [viewQuery] ViewSpec viewQuery - */ - - /** - * Constructs a new ViewSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ViewSpec. - * @implements IViewSpec - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IViewSpec=} [properties] Properties to set - */ - function ViewSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ViewSpec viewQuery. - * @member {string} viewQuery - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @instance - */ - ViewSpec.prototype.viewQuery = ""; - - /** - * Creates a new ViewSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IViewSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec instance - */ - ViewSpec.create = function create(properties) { - return new ViewSpec(properties); - }; - - /** - * Encodes the specified ViewSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IViewSpec} message ViewSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ViewSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.viewQuery != null && Object.hasOwnProperty.call(message, "viewQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.viewQuery); - return writer; - }; - - /** - * Encodes the specified ViewSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ViewSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IViewSpec} message ViewSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ViewSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ViewSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ViewSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ViewSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.viewQuery = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ViewSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ViewSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ViewSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ViewSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) - if (!$util.isString(message.viewQuery)) - return "viewQuery: string expected"; - return null; - }; - - /** - * Creates a ViewSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ViewSpec} ViewSpec - */ - ViewSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ViewSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ViewSpec(); - if (object.viewQuery != null) - message.viewQuery = String(object.viewQuery); - return message; - }; - - /** - * Creates a plain object from a ViewSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.ViewSpec} message ViewSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ViewSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.viewQuery = ""; - if (message.viewQuery != null && message.hasOwnProperty("viewQuery")) - object.viewQuery = message.viewQuery; - return object; - }; - - /** - * Converts this ViewSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @instance - * @returns {Object.} JSON object - */ - ViewSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ViewSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ViewSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ViewSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ViewSpec"; - }; - - return ViewSpec; - })(); - - v1beta1.TableSpec = (function() { - - /** - * Properties of a TableSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITableSpec - * @property {string|null} [groupedEntry] TableSpec groupedEntry - */ - - /** - * Constructs a new TableSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a TableSpec. - * @implements ITableSpec - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITableSpec=} [properties] Properties to set - */ - function TableSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TableSpec groupedEntry. - * @member {string} groupedEntry - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @instance - */ - TableSpec.prototype.groupedEntry = ""; - - /** - * Creates a new TableSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.ITableSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec instance - */ - TableSpec.create = function create(properties) { - return new TableSpec(properties); - }; - - /** - * Encodes the specified TableSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.ITableSpec} message TableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.groupedEntry != null && Object.hasOwnProperty.call(message, "groupedEntry")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.groupedEntry); - return writer; - }; - - /** - * Encodes the specified TableSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TableSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.ITableSpec} message TableSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TableSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TableSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TableSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.groupedEntry = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TableSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TableSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TableSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TableSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) - if (!$util.isString(message.groupedEntry)) - return "groupedEntry: string expected"; - return null; - }; - - /** - * Creates a TableSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TableSpec} TableSpec - */ - TableSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TableSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TableSpec(); - if (object.groupedEntry != null) - message.groupedEntry = String(object.groupedEntry); - return message; - }; - - /** - * Creates a plain object from a TableSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.TableSpec} message TableSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TableSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.groupedEntry = ""; - if (message.groupedEntry != null && message.hasOwnProperty("groupedEntry")) - object.groupedEntry = message.groupedEntry; - return object; - }; - - /** - * Converts this TableSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @instance - * @returns {Object.} JSON object - */ - TableSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TableSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.TableSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TableSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.TableSpec"; - }; - - return TableSpec; - })(); - - v1beta1.BigQueryDateShardedSpec = (function() { - - /** - * Properties of a BigQueryDateShardedSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IBigQueryDateShardedSpec - * @property {string|null} [dataset] BigQueryDateShardedSpec dataset - * @property {string|null} [tablePrefix] BigQueryDateShardedSpec tablePrefix - * @property {number|Long|null} [shardCount] BigQueryDateShardedSpec shardCount - */ - - /** - * Constructs a new BigQueryDateShardedSpec. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a BigQueryDateShardedSpec. - * @implements IBigQueryDateShardedSpec - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec=} [properties] Properties to set - */ - function BigQueryDateShardedSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryDateShardedSpec dataset. - * @member {string} dataset - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @instance - */ - BigQueryDateShardedSpec.prototype.dataset = ""; - - /** - * BigQueryDateShardedSpec tablePrefix. - * @member {string} tablePrefix - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @instance - */ - BigQueryDateShardedSpec.prototype.tablePrefix = ""; - - /** - * BigQueryDateShardedSpec shardCount. - * @member {number|Long} shardCount - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @instance - */ - BigQueryDateShardedSpec.prototype.shardCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new BigQueryDateShardedSpec instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec instance - */ - BigQueryDateShardedSpec.create = function create(properties) { - return new BigQueryDateShardedSpec(properties); - }; - - /** - * Encodes the specified BigQueryDateShardedSpec message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec} message BigQueryDateShardedSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDateShardedSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); - if (message.tablePrefix != null && Object.hasOwnProperty.call(message, "tablePrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tablePrefix); - if (message.shardCount != null && Object.hasOwnProperty.call(message, "shardCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.shardCount); - return writer; - }; - - /** - * Encodes the specified BigQueryDateShardedSpec message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.IBigQueryDateShardedSpec} message BigQueryDateShardedSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryDateShardedSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDateShardedSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataset = reader.string(); - break; - } - case 2: { - message.tablePrefix = reader.string(); - break; - } - case 3: { - message.shardCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryDateShardedSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDateShardedSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryDateShardedSpec message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryDateShardedSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataset != null && message.hasOwnProperty("dataset")) - if (!$util.isString(message.dataset)) - return "dataset: string expected"; - if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) - if (!$util.isString(message.tablePrefix)) - return "tablePrefix: string expected"; - if (message.shardCount != null && message.hasOwnProperty("shardCount")) - if (!$util.isInteger(message.shardCount) && !(message.shardCount && $util.isInteger(message.shardCount.low) && $util.isInteger(message.shardCount.high))) - return "shardCount: integer|Long expected"; - return null; - }; - - /** - * Creates a BigQueryDateShardedSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} BigQueryDateShardedSpec - */ - BigQueryDateShardedSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec(); - if (object.dataset != null) - message.dataset = String(object.dataset); - if (object.tablePrefix != null) - message.tablePrefix = String(object.tablePrefix); - if (object.shardCount != null) - if ($util.Long) - (message.shardCount = $util.Long.fromValue(object.shardCount)).unsigned = false; - else if (typeof object.shardCount === "string") - message.shardCount = parseInt(object.shardCount, 10); - else if (typeof object.shardCount === "number") - message.shardCount = object.shardCount; - else if (typeof object.shardCount === "object") - message.shardCount = new $util.LongBits(object.shardCount.low >>> 0, object.shardCount.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BigQueryDateShardedSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @static - * @param {google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec} message BigQueryDateShardedSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryDateShardedSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataset = ""; - object.tablePrefix = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.shardCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.shardCount = options.longs === String ? "0" : 0; - } - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = message.dataset; - if (message.tablePrefix != null && message.hasOwnProperty("tablePrefix")) - object.tablePrefix = message.tablePrefix; - if (message.shardCount != null && message.hasOwnProperty("shardCount")) - if (typeof message.shardCount === "number") - object.shardCount = options.longs === String ? String(message.shardCount) : message.shardCount; - else - object.shardCount = options.longs === String ? $util.Long.prototype.toString.call(message.shardCount) : options.longs === Number ? new $util.LongBits(message.shardCount.low >>> 0, message.shardCount.high >>> 0).toNumber() : message.shardCount; - return object; - }; - - /** - * Converts this BigQueryDateShardedSpec to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @instance - * @returns {Object.} JSON object - */ - BigQueryDateShardedSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryDateShardedSpec - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryDateShardedSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec"; - }; - - return BigQueryDateShardedSpec; - })(); - - v1beta1.Tag = (function() { - - /** - * Properties of a Tag. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITag - * @property {string|null} [name] Tag name - * @property {string|null} [template] Tag template - * @property {string|null} [templateDisplayName] Tag templateDisplayName - * @property {string|null} [column] Tag column - * @property {Object.|null} [fields] Tag fields - */ - - /** - * Constructs a new Tag. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a Tag. - * @implements ITag - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITag=} [properties] Properties to set - */ - function Tag(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tag name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.name = ""; - - /** - * Tag template. - * @member {string} template - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.template = ""; - - /** - * Tag templateDisplayName. - * @member {string} templateDisplayName - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.templateDisplayName = ""; - - /** - * Tag column. - * @member {string|null|undefined} column - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.column = null; - - /** - * Tag fields. - * @member {Object.} fields - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Tag.prototype.fields = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Tag scope. - * @member {"column"|undefined} scope - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - */ - Object.defineProperty(Tag.prototype, "scope", { - get: $util.oneOfGetter($oneOfFields = ["column"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Tag instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @static - * @param {google.cloud.datacatalog.v1beta1.ITag=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag instance - */ - Tag.create = function create(properties) { - return new Tag(properties); - }; - - /** - * Encodes the specified Tag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @static - * @param {google.cloud.datacatalog.v1beta1.ITag} message Tag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tag.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.template != null && Object.hasOwnProperty.call(message, "template")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.template); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.datacatalog.v1beta1.TagField.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.column); - if (message.templateDisplayName != null && Object.hasOwnProperty.call(message, "templateDisplayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.templateDisplayName); - return writer; - }; - - /** - * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Tag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @static - * @param {google.cloud.datacatalog.v1beta1.ITag} message Tag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Tag message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tag.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Tag(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.template = reader.string(); - break; - } - case 5: { - message.templateDisplayName = reader.string(); - break; - } - case 4: { - message.column = reader.string(); - break; - } - case 3: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.datacatalog.v1beta1.TagField.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Tag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tag message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tag.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.template != null && message.hasOwnProperty("template")) - if (!$util.isString(message.template)) - return "template: string expected"; - if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) - if (!$util.isString(message.templateDisplayName)) - return "templateDisplayName: string expected"; - if (message.column != null && message.hasOwnProperty("column")) { - properties.scope = 1; - if (!$util.isString(message.column)) - return "column: string expected"; - } - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.TagField.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a Tag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.Tag} Tag - */ - Tag.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.Tag) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.Tag(); - if (object.name != null) - message.name = String(object.name); - if (object.template != null) - message.template = String(object.template); - if (object.templateDisplayName != null) - message.templateDisplayName = String(object.templateDisplayName); - if (object.column != null) - message.column = String(object.column); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Tag.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.Tag.fields: object expected"); - message.fields[keys[i]] = $root.google.cloud.datacatalog.v1beta1.TagField.fromObject(object.fields[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Tag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @static - * @param {google.cloud.datacatalog.v1beta1.Tag} message Tag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - if (options.defaults) { - object.name = ""; - object.template = ""; - object.templateDisplayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.template != null && message.hasOwnProperty("template")) - object.template = message.template; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.cloud.datacatalog.v1beta1.TagField.toObject(message.fields[keys2[j]], options); - } - if (message.column != null && message.hasOwnProperty("column")) { - object.column = message.column; - if (options.oneofs) - object.scope = "column"; - } - if (message.templateDisplayName != null && message.hasOwnProperty("templateDisplayName")) - object.templateDisplayName = message.templateDisplayName; - return object; - }; - - /** - * Converts this Tag to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @instance - * @returns {Object.} JSON object - */ - Tag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Tag - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.Tag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Tag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.Tag"; - }; - - return Tag; - })(); - - v1beta1.TagField = (function() { - - /** - * Properties of a TagField. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITagField - * @property {string|null} [displayName] TagField displayName - * @property {number|null} [doubleValue] TagField doubleValue - * @property {string|null} [stringValue] TagField stringValue - * @property {boolean|null} [boolValue] TagField boolValue - * @property {google.protobuf.ITimestamp|null} [timestampValue] TagField timestampValue - * @property {google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null} [enumValue] TagField enumValue - * @property {number|null} [order] TagField order - */ - - /** - * Constructs a new TagField. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a TagField. - * @implements ITagField - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITagField=} [properties] Properties to set - */ - function TagField(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TagField displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance - */ - TagField.prototype.displayName = ""; - - /** - * TagField doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance - */ - TagField.prototype.doubleValue = null; - - /** - * TagField stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance - */ - TagField.prototype.stringValue = null; - - /** - * TagField boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance - */ - TagField.prototype.boolValue = null; - - /** - * TagField timestampValue. - * @member {google.protobuf.ITimestamp|null|undefined} timestampValue - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance - */ - TagField.prototype.timestampValue = null; - - /** - * TagField enumValue. - * @member {google.cloud.datacatalog.v1beta1.TagField.IEnumValue|null|undefined} enumValue - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance - */ - TagField.prototype.enumValue = null; - - /** - * TagField order. - * @member {number} order - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance - */ - TagField.prototype.order = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TagField kind. - * @member {"doubleValue"|"stringValue"|"boolValue"|"timestampValue"|"enumValue"|undefined} kind - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance - */ - Object.defineProperty(TagField.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["doubleValue", "stringValue", "boolValue", "timestampValue", "enumValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TagField instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @static - * @param {google.cloud.datacatalog.v1beta1.ITagField=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField instance - */ - TagField.create = function create(properties) { - return new TagField(properties); - }; - - /** - * Encodes the specified TagField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @static - * @param {google.cloud.datacatalog.v1beta1.ITagField} message TagField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagField.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.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) - $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.enumValue != null && Object.hasOwnProperty.call(message, "enumValue")) - $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.encode(message.enumValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.order != null && Object.hasOwnProperty.call(message, "order")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.order); - return writer; - }; - - /** - * Encodes the specified TagField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @static - * @param {google.cloud.datacatalog.v1beta1.ITagField} message TagField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TagField message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagField.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagField(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.doubleValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.enumValue = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.decode(reader, reader.uint32()); - break; - } - case 7: { - message.order = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TagField message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagField.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TagField message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TagField.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - properties.kind = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.timestampValue); - if (error) - return "timestampValue." + error; - } - } - if (message.enumValue != null && message.hasOwnProperty("enumValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify(message.enumValue); - if (error) - return "enumValue." + error; - } - } - if (message.order != null && message.hasOwnProperty("order")) - if (!$util.isInteger(message.order)) - return "order: integer expected"; - return null; - }; - - /** - * Creates a TagField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TagField} TagField - */ - TagField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagField) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TagField(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.timestampValue != null) { - if (typeof object.timestampValue !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagField.timestampValue: object expected"); - message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); - } - if (object.enumValue != null) { - if (typeof object.enumValue !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagField.enumValue: object expected"); - message.enumValue = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.fromObject(object.enumValue); - } - if (object.order != null) - message.order = object.order | 0; - return message; - }; - - /** - * Creates a plain object from a TagField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @static - * @param {google.cloud.datacatalog.v1beta1.TagField} message TagField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TagField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.order = 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.kind = "doubleValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); - if (options.oneofs) - object.kind = "timestampValue"; - } - if (message.enumValue != null && message.hasOwnProperty("enumValue")) { - object.enumValue = $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue.toObject(message.enumValue, options); - if (options.oneofs) - object.kind = "enumValue"; - } - if (message.order != null && message.hasOwnProperty("order")) - object.order = message.order; - return object; - }; - - /** - * Converts this TagField to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @instance - * @returns {Object.} JSON object - */ - TagField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TagField - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TagField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.TagField"; - }; - - TagField.EnumValue = (function() { - - /** - * Properties of an EnumValue. - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @interface IEnumValue - * @property {string|null} [displayName] EnumValue displayName - */ - - /** - * Constructs a new EnumValue. - * @memberof google.cloud.datacatalog.v1beta1.TagField - * @classdesc Represents an EnumValue. - * @implements IEnumValue - * @constructor - * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue=} [properties] Properties to set - */ - function EnumValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValue displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @instance - */ - EnumValue.prototype.displayName = ""; - - /** - * Creates a new EnumValue instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue instance - */ - EnumValue.create = function create(properties) { - return new EnumValue(properties); - }; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.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); - return writer; - }; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagField.EnumValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.TagField.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValue message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValue.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"; - return null; - }; - - /** - * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TagField.EnumValue} EnumValue - */ - EnumValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TagField.EnumValue(); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.TagField.EnumValue} message EnumValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.displayName = ""; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this EnumValue to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @instance - * @returns {Object.} JSON object - */ - EnumValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValue - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.TagField.EnumValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.TagField.EnumValue"; - }; - - return EnumValue; - })(); - - return TagField; - })(); - - v1beta1.TagTemplate = (function() { - - /** - * Properties of a TagTemplate. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITagTemplate - * @property {string|null} [name] TagTemplate name - * @property {string|null} [displayName] TagTemplate displayName - * @property {Object.|null} [fields] TagTemplate fields - */ - - /** - * Constructs a new TagTemplate. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a TagTemplate. - * @implements ITagTemplate - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITagTemplate=} [properties] Properties to set - */ - function TagTemplate(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TagTemplate name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @instance - */ - TagTemplate.prototype.name = ""; - - /** - * TagTemplate displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @instance - */ - TagTemplate.prototype.displayName = ""; - - /** - * TagTemplate fields. - * @member {Object.} fields - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @instance - */ - TagTemplate.prototype.fields = $util.emptyObject; - - /** - * Creates a new TagTemplate instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplate=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate instance - */ - TagTemplate.create = function create(properties) { - return new TagTemplate(properties); - }; - - /** - * Encodes the specified TagTemplate message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplate} message TagTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagTemplate.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.datacatalog.v1beta1.TagTemplateField.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified TagTemplate message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplate} message TagTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TagTemplate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagTemplate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagTemplate(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TagTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagTemplate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TagTemplate message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TagTemplate.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a TagTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TagTemplate} TagTemplate - */ - TagTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagTemplate) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TagTemplate(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagTemplate.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagTemplate.fields: object expected"); - message.fields[keys[i]] = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.fromObject(object.fields[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a TagTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @static - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} message TagTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TagTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.cloud.datacatalog.v1beta1.TagTemplateField.toObject(message.fields[keys2[j]], options); - } - return object; - }; - - /** - * Converts this TagTemplate to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @instance - * @returns {Object.} JSON object - */ - TagTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TagTemplate - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.TagTemplate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TagTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.TagTemplate"; - }; - - return TagTemplate; - })(); - - v1beta1.TagTemplateField = (function() { - - /** - * Properties of a TagTemplateField. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITagTemplateField - * @property {string|null} [name] TagTemplateField name - * @property {string|null} [displayName] TagTemplateField displayName - * @property {google.cloud.datacatalog.v1beta1.IFieldType|null} [type] TagTemplateField type - * @property {boolean|null} [isRequired] TagTemplateField isRequired - * @property {number|null} [order] TagTemplateField order - */ - - /** - * Constructs a new TagTemplateField. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a TagTemplateField. - * @implements ITagTemplateField - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField=} [properties] Properties to set - */ - function TagTemplateField(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TagTemplateField name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.name = ""; - - /** - * TagTemplateField displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.displayName = ""; - - /** - * TagTemplateField type. - * @member {google.cloud.datacatalog.v1beta1.IFieldType|null|undefined} type - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.type = null; - - /** - * TagTemplateField isRequired. - * @member {boolean} isRequired - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.isRequired = false; - - /** - * TagTemplateField order. - * @member {number} order - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @instance - */ - TagTemplateField.prototype.order = 0; - - /** - * Creates a new TagTemplateField instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField instance - */ - TagTemplateField.create = function create(properties) { - return new TagTemplateField(properties); - }; - - /** - * Encodes the specified TagTemplateField message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField} message TagTemplateField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagTemplateField.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.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.cloud.datacatalog.v1beta1.FieldType.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.isRequired != null && Object.hasOwnProperty.call(message, "isRequired")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isRequired); - if (message.order != null && Object.hasOwnProperty.call(message, "order")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.order); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - return writer; - }; - - /** - * Encodes the specified TagTemplateField message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.TagTemplateField.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @static - * @param {google.cloud.datacatalog.v1beta1.ITagTemplateField} message TagTemplateField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagTemplateField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TagTemplateField message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagTemplateField.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.TagTemplateField(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: { - message.name = reader.string(); - break; - } - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.type = $root.google.cloud.datacatalog.v1beta1.FieldType.decode(reader, reader.uint32()); - break; - } - case 3: { - message.isRequired = reader.bool(); - break; - } - case 5: { - message.order = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TagTemplateField message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagTemplateField.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TagTemplateField message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TagTemplateField.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) { - var error = $root.google.cloud.datacatalog.v1beta1.FieldType.verify(message.type); - if (error) - return "type." + error; - } - if (message.isRequired != null && message.hasOwnProperty("isRequired")) - if (typeof message.isRequired !== "boolean") - return "isRequired: boolean expected"; - if (message.order != null && message.hasOwnProperty("order")) - if (!$util.isInteger(message.order)) - return "order: integer expected"; - return null; - }; - - /** - * Creates a TagTemplateField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.TagTemplateField} TagTemplateField - */ - TagTemplateField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.TagTemplateField) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.TagTemplateField(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.type != null) { - if (typeof object.type !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.TagTemplateField.type: object expected"); - message.type = $root.google.cloud.datacatalog.v1beta1.FieldType.fromObject(object.type); - } - if (object.isRequired != null) - message.isRequired = Boolean(object.isRequired); - if (object.order != null) - message.order = object.order | 0; - return message; - }; - - /** - * Creates a plain object from a TagTemplateField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @static - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} message TagTemplateField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TagTemplateField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.type = null; - object.isRequired = false; - object.order = 0; - object.name = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.cloud.datacatalog.v1beta1.FieldType.toObject(message.type, options); - if (message.isRequired != null && message.hasOwnProperty("isRequired")) - object.isRequired = message.isRequired; - if (message.order != null && message.hasOwnProperty("order")) - object.order = message.order; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this TagTemplateField to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @instance - * @returns {Object.} JSON object - */ - TagTemplateField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TagTemplateField - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.TagTemplateField - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TagTemplateField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.TagTemplateField"; - }; - - return TagTemplateField; - })(); - - v1beta1.FieldType = (function() { - - /** - * Properties of a FieldType. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IFieldType - * @property {google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|null} [primitiveType] FieldType primitiveType - * @property {google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null} [enumType] FieldType enumType - */ - - /** - * Constructs a new FieldType. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a FieldType. - * @implements IFieldType - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IFieldType=} [properties] Properties to set - */ - function FieldType(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldType primitiveType. - * @member {google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType|null|undefined} primitiveType - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @instance - */ - FieldType.prototype.primitiveType = null; - - /** - * FieldType enumType. - * @member {google.cloud.datacatalog.v1beta1.FieldType.IEnumType|null|undefined} enumType - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @instance - */ - FieldType.prototype.enumType = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FieldType typeDecl. - * @member {"primitiveType"|"enumType"|undefined} typeDecl - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @instance - */ - Object.defineProperty(FieldType.prototype, "typeDecl", { - get: $util.oneOfGetter($oneOfFields = ["primitiveType", "enumType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FieldType instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @static - * @param {google.cloud.datacatalog.v1beta1.IFieldType=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType instance - */ - FieldType.create = function create(properties) { - return new FieldType(properties); - }; - - /** - * Encodes the specified FieldType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @static - * @param {google.cloud.datacatalog.v1beta1.IFieldType} message FieldType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldType.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.primitiveType != null && Object.hasOwnProperty.call(message, "primitiveType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.primitiveType); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.encode(message.enumType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @static - * @param {google.cloud.datacatalog.v1beta1.IFieldType} message FieldType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldType message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.FieldType(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.primitiveType = reader.int32(); - break; - } - case 2: { - message.enumType = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldType message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldType.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) { - properties.typeDecl = 1; - switch (message.primitiveType) { - default: - return "primitiveType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (properties.typeDecl === 1) - return "typeDecl: multiple values"; - properties.typeDecl = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify(message.enumType); - if (error) - return "enumType." + error; - } - } - return null; - }; - - /** - * Creates a FieldType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.FieldType} FieldType - */ - FieldType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.FieldType) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.FieldType(); - switch (object.primitiveType) { - default: - if (typeof object.primitiveType === "number") { - message.primitiveType = object.primitiveType; - break; - } - break; - case "PRIMITIVE_TYPE_UNSPECIFIED": - case 0: - message.primitiveType = 0; - break; - case "DOUBLE": - case 1: - message.primitiveType = 1; - break; - case "STRING": - case 2: - message.primitiveType = 2; - break; - case "BOOL": - case 3: - message.primitiveType = 3; - break; - case "TIMESTAMP": - case 4: - message.primitiveType = 4; - break; - } - if (object.enumType != null) { - if (typeof object.enumType !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.FieldType.enumType: object expected"); - message.enumType = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.fromObject(object.enumType); - } - return message; - }; - - /** - * Creates a plain object from a FieldType message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType} message FieldType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.primitiveType != null && message.hasOwnProperty("primitiveType")) { - object.primitiveType = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType[message.primitiveType] === undefined ? message.primitiveType : $root.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType[message.primitiveType] : message.primitiveType; - if (options.oneofs) - object.typeDecl = "primitiveType"; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - object.enumType = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.toObject(message.enumType, options); - if (options.oneofs) - object.typeDecl = "enumType"; - } - return object; - }; - - /** - * Converts this FieldType to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @instance - * @returns {Object.} JSON object - */ - FieldType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldType - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.FieldType"; - }; - - FieldType.EnumType = (function() { - - /** - * Properties of an EnumType. - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @interface IEnumType - * @property {Array.|null} [allowedValues] EnumType allowedValues - */ - - /** - * Constructs a new EnumType. - * @memberof google.cloud.datacatalog.v1beta1.FieldType - * @classdesc Represents an EnumType. - * @implements IEnumType - * @constructor - * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType=} [properties] Properties to set - */ - function EnumType(properties) { - this.allowedValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumType allowedValues. - * @member {Array.} allowedValues - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @instance - */ - EnumType.prototype.allowedValues = $util.emptyArray; - - /** - * Creates a new EnumType instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType instance - */ - EnumType.create = function create(properties) { - return new EnumType(properties); - }; - - /** - * Encodes the specified EnumType message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType} message EnumType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumType.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowedValues != null && message.allowedValues.length) - for (var i = 0; i < message.allowedValues.length; ++i) - $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.encode(message.allowedValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumType message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.IEnumType} message EnumType message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumType.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumType message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumType.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.allowedValues && message.allowedValues.length)) - message.allowedValues = []; - message.allowedValues.push($root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumType message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumType.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumType message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumType.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowedValues != null && message.hasOwnProperty("allowedValues")) { - if (!Array.isArray(message.allowedValues)) - return "allowedValues: array expected"; - for (var i = 0; i < message.allowedValues.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify(message.allowedValues[i]); - if (error) - return "allowedValues." + error; - } - } - return null; - }; - - /** - * Creates an EnumType message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType} EnumType - */ - EnumType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType(); - if (object.allowedValues) { - if (!Array.isArray(object.allowedValues)) - throw TypeError(".google.cloud.datacatalog.v1beta1.FieldType.EnumType.allowedValues: array expected"); - message.allowedValues = []; - for (var i = 0; i < object.allowedValues.length; ++i) { - if (typeof object.allowedValues[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.FieldType.EnumType.allowedValues: object expected"); - message.allowedValues[i] = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.fromObject(object.allowedValues[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumType message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType} message EnumType - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumType.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.allowedValues = []; - if (message.allowedValues && message.allowedValues.length) { - object.allowedValues = []; - for (var j = 0; j < message.allowedValues.length; ++j) - object.allowedValues[j] = $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.toObject(message.allowedValues[j], options); - } - return object; - }; - - /** - * Converts this EnumType to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @instance - * @returns {Object.} JSON object - */ - EnumType.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumType - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.FieldType.EnumType"; - }; - - EnumType.EnumValue = (function() { - - /** - * Properties of an EnumValue. - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @interface IEnumValue - * @property {string|null} [displayName] EnumValue displayName - */ - - /** - * Constructs a new EnumValue. - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType - * @classdesc Represents an EnumValue. - * @implements IEnumValue - * @constructor - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue=} [properties] Properties to set - */ - function EnumValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValue displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @instance - */ - EnumValue.prototype.displayName = ""; - - /** - * Creates a new EnumValue instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue instance - */ - EnumValue.create = function create(properties) { - return new EnumValue(properties); - }; - - /** - * Encodes the specified EnumValue message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.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); - return writer; - }; - - /** - * Encodes the specified EnumValue message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.IEnumValue} message EnumValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValue message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValue.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"; - return null; - }; - - /** - * Creates an EnumValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} EnumValue - */ - EnumValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue(); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from an EnumValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} message EnumValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.displayName = ""; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this EnumValue to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @instance - * @returns {Object.} JSON object - */ - EnumValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValue - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue"; - }; - - return EnumValue; - })(); - - return EnumType; - })(); - - /** - * PrimitiveType enum. - * @name google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType - * @enum {number} - * @property {number} PRIMITIVE_TYPE_UNSPECIFIED=0 PRIMITIVE_TYPE_UNSPECIFIED value - * @property {number} DOUBLE=1 DOUBLE value - * @property {number} STRING=2 STRING value - * @property {number} BOOL=3 BOOL value - * @property {number} TIMESTAMP=4 TIMESTAMP value - */ - FieldType.PrimitiveType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIMITIVE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DOUBLE"] = 1; - values[valuesById[2] = "STRING"] = 2; - values[valuesById[3] = "BOOL"] = 3; - values[valuesById[4] = "TIMESTAMP"] = 4; - return values; - })(); - - return FieldType; - })(); - - v1beta1.PolicyTagManager = (function() { - - /** - * Constructs a new PolicyTagManager service. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a PolicyTagManager - * @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 PolicyTagManager(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (PolicyTagManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PolicyTagManager; - - /** - * Creates new PolicyTagManager service using the specified rpc implementation. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @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 {PolicyTagManager} RPC service. Useful where requests and/or responses are streamed. - */ - PolicyTagManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|createTaxonomy}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef CreateTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Taxonomy} [response] Taxonomy - */ - - /** - * Calls CreateTaxonomy. - * @function createTaxonomy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest} request CreateTaxonomyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.createTaxonomy = function createTaxonomy(request, callback) { - return this.rpcCall(createTaxonomy, $root.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest, $root.google.cloud.datacatalog.v1beta1.Taxonomy, request, callback); - }, "name", { value: "CreateTaxonomy" }); - - /** - * Calls CreateTaxonomy. - * @function createTaxonomy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest} request CreateTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|deleteTaxonomy}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef DeleteTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTaxonomy. - * @function deleteTaxonomy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest} request DeleteTaxonomyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomyCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.deleteTaxonomy = function deleteTaxonomy(request, callback) { - return this.rpcCall(deleteTaxonomy, $root.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTaxonomy" }); - - /** - * Calls DeleteTaxonomy. - * @function deleteTaxonomy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest} request DeleteTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|updateTaxonomy}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef UpdateTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Taxonomy} [response] Taxonomy - */ - - /** - * Calls UpdateTaxonomy. - * @function updateTaxonomy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest} request UpdateTaxonomyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.updateTaxonomy = function updateTaxonomy(request, callback) { - return this.rpcCall(updateTaxonomy, $root.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest, $root.google.cloud.datacatalog.v1beta1.Taxonomy, request, callback); - }, "name", { value: "UpdateTaxonomy" }); - - /** - * Calls UpdateTaxonomy. - * @function updateTaxonomy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest} request UpdateTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|listTaxonomies}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef ListTaxonomiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} [response] ListTaxonomiesResponse - */ - - /** - * Calls ListTaxonomies. - * @function listTaxonomies - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest} request ListTaxonomiesRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomiesCallback} callback Node-style callback called with the error, if any, and ListTaxonomiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.listTaxonomies = function listTaxonomies(request, callback) { - return this.rpcCall(listTaxonomies, $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest, $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse, request, callback); - }, "name", { value: "ListTaxonomies" }); - - /** - * Calls ListTaxonomies. - * @function listTaxonomies - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest} request ListTaxonomiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|getTaxonomy}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef GetTaxonomyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.Taxonomy} [response] Taxonomy - */ - - /** - * Calls GetTaxonomy. - * @function getTaxonomy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest} request GetTaxonomyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomyCallback} callback Node-style callback called with the error, if any, and Taxonomy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.getTaxonomy = function getTaxonomy(request, callback) { - return this.rpcCall(getTaxonomy, $root.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest, $root.google.cloud.datacatalog.v1beta1.Taxonomy, request, callback); - }, "name", { value: "GetTaxonomy" }); - - /** - * Calls GetTaxonomy. - * @function getTaxonomy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest} request GetTaxonomyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|createPolicyTag}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef CreatePolicyTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.PolicyTag} [response] PolicyTag - */ - - /** - * Calls CreatePolicyTag. - * @function createPolicyTag - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest} request CreatePolicyTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTagCallback} callback Node-style callback called with the error, if any, and PolicyTag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.createPolicyTag = function createPolicyTag(request, callback) { - return this.rpcCall(createPolicyTag, $root.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest, $root.google.cloud.datacatalog.v1beta1.PolicyTag, request, callback); - }, "name", { value: "CreatePolicyTag" }); - - /** - * Calls CreatePolicyTag. - * @function createPolicyTag - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest} request CreatePolicyTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|deletePolicyTag}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef DeletePolicyTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeletePolicyTag. - * @function deletePolicyTag - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest} request DeletePolicyTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTagCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.deletePolicyTag = function deletePolicyTag(request, callback) { - return this.rpcCall(deletePolicyTag, $root.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePolicyTag" }); - - /** - * Calls DeletePolicyTag. - * @function deletePolicyTag - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest} request DeletePolicyTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|updatePolicyTag}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef UpdatePolicyTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.PolicyTag} [response] PolicyTag - */ - - /** - * Calls UpdatePolicyTag. - * @function updatePolicyTag - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest} request UpdatePolicyTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTagCallback} callback Node-style callback called with the error, if any, and PolicyTag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.updatePolicyTag = function updatePolicyTag(request, callback) { - return this.rpcCall(updatePolicyTag, $root.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest, $root.google.cloud.datacatalog.v1beta1.PolicyTag, request, callback); - }, "name", { value: "UpdatePolicyTag" }); - - /** - * Calls UpdatePolicyTag. - * @function updatePolicyTag - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest} request UpdatePolicyTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|listPolicyTags}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef ListPolicyTagsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} [response] ListPolicyTagsResponse - */ - - /** - * Calls ListPolicyTags. - * @function listPolicyTags - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest} request ListPolicyTagsRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTagsCallback} callback Node-style callback called with the error, if any, and ListPolicyTagsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.listPolicyTags = function listPolicyTags(request, callback) { - return this.rpcCall(listPolicyTags, $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest, $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse, request, callback); - }, "name", { value: "ListPolicyTags" }); - - /** - * Calls ListPolicyTags. - * @function listPolicyTags - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest} request ListPolicyTagsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|getPolicyTag}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef GetPolicyTagCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.PolicyTag} [response] PolicyTag - */ - - /** - * Calls GetPolicyTag. - * @function getPolicyTag - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest} request GetPolicyTagRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTagCallback} callback Node-style callback called with the error, if any, and PolicyTag - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.getPolicyTag = function getPolicyTag(request, callback) { - return this.rpcCall(getPolicyTag, $root.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest, $root.google.cloud.datacatalog.v1beta1.PolicyTag, request, callback); - }, "name", { value: "GetPolicyTag" }); - - /** - * Calls GetPolicyTag. - * @function getPolicyTag - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest} request GetPolicyTagRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|getIamPolicy}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|setIamPolicy}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManager|testIamPermissions}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManager.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManager.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManager - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return PolicyTagManager; - })(); - - v1beta1.Taxonomy = (function() { - - /** - * Properties of a Taxonomy. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ITaxonomy - * @property {string|null} [name] Taxonomy name - * @property {string|null} [displayName] Taxonomy displayName - * @property {string|null} [description] Taxonomy description - * @property {Array.|null} [activatedPolicyTypes] Taxonomy activatedPolicyTypes - */ - - /** - * Constructs a new Taxonomy. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a Taxonomy. - * @implements ITaxonomy - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ITaxonomy=} [properties] Properties to set - */ - function Taxonomy(properties) { - this.activatedPolicyTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Taxonomy name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @instance - */ - Taxonomy.prototype.name = ""; - - /** - * Taxonomy displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @instance - */ - Taxonomy.prototype.displayName = ""; - - /** - * Taxonomy description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @instance - */ - Taxonomy.prototype.description = ""; - - /** - * Taxonomy activatedPolicyTypes. - * @member {Array.} activatedPolicyTypes - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @instance - */ - Taxonomy.prototype.activatedPolicyTypes = $util.emptyArray; - - /** - * Creates a new Taxonomy instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @static - * @param {google.cloud.datacatalog.v1beta1.ITaxonomy=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.Taxonomy} Taxonomy instance - */ - Taxonomy.create = function create(properties) { - return new Taxonomy(properties); - }; - - /** - * Encodes the specified Taxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @static - * @param {google.cloud.datacatalog.v1beta1.ITaxonomy} message Taxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Taxonomy.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.activatedPolicyTypes != null && message.activatedPolicyTypes.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.activatedPolicyTypes.length; ++i) - writer.int32(message.activatedPolicyTypes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Taxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.Taxonomy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @static - * @param {google.cloud.datacatalog.v1beta1.ITaxonomy} message Taxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Taxonomy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Taxonomy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.Taxonomy} Taxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Taxonomy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.Taxonomy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 6: { - if (!(message.activatedPolicyTypes && message.activatedPolicyTypes.length)) - message.activatedPolicyTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.activatedPolicyTypes.push(reader.int32()); - } else - message.activatedPolicyTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Taxonomy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.Taxonomy} Taxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Taxonomy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Taxonomy message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Taxonomy.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.activatedPolicyTypes != null && message.hasOwnProperty("activatedPolicyTypes")) { - if (!Array.isArray(message.activatedPolicyTypes)) - return "activatedPolicyTypes: array expected"; - for (var i = 0; i < message.activatedPolicyTypes.length; ++i) - switch (message.activatedPolicyTypes[i]) { - default: - return "activatedPolicyTypes: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a Taxonomy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.Taxonomy} Taxonomy - */ - Taxonomy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.Taxonomy) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.Taxonomy(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.activatedPolicyTypes) { - if (!Array.isArray(object.activatedPolicyTypes)) - throw TypeError(".google.cloud.datacatalog.v1beta1.Taxonomy.activatedPolicyTypes: array expected"); - message.activatedPolicyTypes = []; - for (var i = 0; i < object.activatedPolicyTypes.length; ++i) - switch (object.activatedPolicyTypes[i]) { - default: - if (typeof object.activatedPolicyTypes[i] === "number") { - message.activatedPolicyTypes[i] = object.activatedPolicyTypes[i]; - break; - } - case "POLICY_TYPE_UNSPECIFIED": - case 0: - message.activatedPolicyTypes[i] = 0; - break; - case "FINE_GRAINED_ACCESS_CONTROL": - case 1: - message.activatedPolicyTypes[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Taxonomy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @static - * @param {google.cloud.datacatalog.v1beta1.Taxonomy} message Taxonomy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Taxonomy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.activatedPolicyTypes = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.activatedPolicyTypes && message.activatedPolicyTypes.length) { - object.activatedPolicyTypes = []; - for (var j = 0; j < message.activatedPolicyTypes.length; ++j) - object.activatedPolicyTypes[j] = options.enums === String ? $root.google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] === undefined ? message.activatedPolicyTypes[j] : $root.google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType[message.activatedPolicyTypes[j]] : message.activatedPolicyTypes[j]; - } - return object; - }; - - /** - * Converts this Taxonomy to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @instance - * @returns {Object.} JSON object - */ - Taxonomy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Taxonomy - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.Taxonomy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Taxonomy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.Taxonomy"; - }; - - /** - * PolicyType enum. - * @name google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType - * @enum {number} - * @property {number} POLICY_TYPE_UNSPECIFIED=0 POLICY_TYPE_UNSPECIFIED value - * @property {number} FINE_GRAINED_ACCESS_CONTROL=1 FINE_GRAINED_ACCESS_CONTROL value - */ - Taxonomy.PolicyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "POLICY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FINE_GRAINED_ACCESS_CONTROL"] = 1; - return values; - })(); - - return Taxonomy; - })(); - - v1beta1.PolicyTag = (function() { - - /** - * Properties of a PolicyTag. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IPolicyTag - * @property {string|null} [name] PolicyTag name - * @property {string|null} [displayName] PolicyTag displayName - * @property {string|null} [description] PolicyTag description - * @property {string|null} [parentPolicyTag] PolicyTag parentPolicyTag - * @property {Array.|null} [childPolicyTags] PolicyTag childPolicyTags - */ - - /** - * Constructs a new PolicyTag. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a PolicyTag. - * @implements IPolicyTag - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IPolicyTag=} [properties] Properties to set - */ - function PolicyTag(properties) { - this.childPolicyTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PolicyTag name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @instance - */ - PolicyTag.prototype.name = ""; - - /** - * PolicyTag displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @instance - */ - PolicyTag.prototype.displayName = ""; - - /** - * PolicyTag description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @instance - */ - PolicyTag.prototype.description = ""; - - /** - * PolicyTag parentPolicyTag. - * @member {string} parentPolicyTag - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @instance - */ - PolicyTag.prototype.parentPolicyTag = ""; - - /** - * PolicyTag childPolicyTags. - * @member {Array.} childPolicyTags - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @instance - */ - PolicyTag.prototype.childPolicyTags = $util.emptyArray; - - /** - * Creates a new PolicyTag instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @static - * @param {google.cloud.datacatalog.v1beta1.IPolicyTag=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.PolicyTag} PolicyTag instance - */ - PolicyTag.create = function create(properties) { - return new PolicyTag(properties); - }; - - /** - * Encodes the specified PolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.PolicyTag.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @static - * @param {google.cloud.datacatalog.v1beta1.IPolicyTag} message PolicyTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyTag.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.parentPolicyTag != null && Object.hasOwnProperty.call(message, "parentPolicyTag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parentPolicyTag); - if (message.childPolicyTags != null && message.childPolicyTags.length) - for (var i = 0; i < message.childPolicyTags.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.childPolicyTags[i]); - return writer; - }; - - /** - * Encodes the specified PolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.PolicyTag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @static - * @param {google.cloud.datacatalog.v1beta1.IPolicyTag} message PolicyTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PolicyTag message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.PolicyTag} PolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyTag.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.PolicyTag(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.parentPolicyTag = reader.string(); - break; - } - case 5: { - if (!(message.childPolicyTags && message.childPolicyTags.length)) - message.childPolicyTags = []; - message.childPolicyTags.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PolicyTag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.PolicyTag} PolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyTag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PolicyTag message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyTag.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.parentPolicyTag != null && message.hasOwnProperty("parentPolicyTag")) - if (!$util.isString(message.parentPolicyTag)) - return "parentPolicyTag: string expected"; - if (message.childPolicyTags != null && message.hasOwnProperty("childPolicyTags")) { - if (!Array.isArray(message.childPolicyTags)) - return "childPolicyTags: array expected"; - for (var i = 0; i < message.childPolicyTags.length; ++i) - if (!$util.isString(message.childPolicyTags[i])) - return "childPolicyTags: string[] expected"; - } - return null; - }; - - /** - * Creates a PolicyTag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.PolicyTag} PolicyTag - */ - PolicyTag.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.PolicyTag) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.PolicyTag(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.parentPolicyTag != null) - message.parentPolicyTag = String(object.parentPolicyTag); - if (object.childPolicyTags) { - if (!Array.isArray(object.childPolicyTags)) - throw TypeError(".google.cloud.datacatalog.v1beta1.PolicyTag.childPolicyTags: array expected"); - message.childPolicyTags = []; - for (var i = 0; i < object.childPolicyTags.length; ++i) - message.childPolicyTags[i] = String(object.childPolicyTags[i]); - } - return message; - }; - - /** - * Creates a plain object from a PolicyTag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @static - * @param {google.cloud.datacatalog.v1beta1.PolicyTag} message PolicyTag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyTag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.childPolicyTags = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.parentPolicyTag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.parentPolicyTag != null && message.hasOwnProperty("parentPolicyTag")) - object.parentPolicyTag = message.parentPolicyTag; - if (message.childPolicyTags && message.childPolicyTags.length) { - object.childPolicyTags = []; - for (var j = 0; j < message.childPolicyTags.length; ++j) - object.childPolicyTags[j] = message.childPolicyTags[j]; - } - return object; - }; - - /** - * Converts this PolicyTag to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @instance - * @returns {Object.} JSON object - */ - PolicyTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PolicyTag - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.PolicyTag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.PolicyTag"; - }; - - return PolicyTag; - })(); - - v1beta1.CreateTaxonomyRequest = (function() { - - /** - * Properties of a CreateTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreateTaxonomyRequest - * @property {string|null} [parent] CreateTaxonomyRequest parent - * @property {google.cloud.datacatalog.v1beta1.ITaxonomy|null} [taxonomy] CreateTaxonomyRequest taxonomy - */ - - /** - * Constructs a new CreateTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreateTaxonomyRequest. - * @implements ICreateTaxonomyRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest=} [properties] Properties to set - */ - function CreateTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateTaxonomyRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @instance - */ - CreateTaxonomyRequest.prototype.parent = ""; - - /** - * CreateTaxonomyRequest taxonomy. - * @member {google.cloud.datacatalog.v1beta1.ITaxonomy|null|undefined} taxonomy - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @instance - */ - CreateTaxonomyRequest.prototype.taxonomy = null; - - /** - * Creates a new CreateTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} CreateTaxonomyRequest instance - */ - CreateTaxonomyRequest.create = function create(properties) { - return new CreateTaxonomyRequest(properties); - }; - - /** - * Encodes the specified CreateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest} message CreateTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTaxonomyRequest.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.taxonomy != null && Object.hasOwnProperty.call(message, "taxonomy")) - $root.google.cloud.datacatalog.v1beta1.Taxonomy.encode(message.taxonomy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest} message CreateTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} CreateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} CreateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTaxonomyRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTaxonomyRequest.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.taxonomy != null && message.hasOwnProperty("taxonomy")) { - var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.verify(message.taxonomy); - if (error) - return "taxonomy." + error; - } - return null; - }; - - /** - * Creates a CreateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} CreateTaxonomyRequest - */ - CreateTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.taxonomy != null) { - if (typeof object.taxonomy !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.taxonomy: object expected"); - message.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.fromObject(object.taxonomy); - } - return message; - }; - - /** - * Creates a plain object from a CreateTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest} message CreateTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTaxonomyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.taxonomy = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) - object.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.toObject(message.taxonomy, options); - return object; - }; - - /** - * Converts this CreateTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest"; - }; - - return CreateTaxonomyRequest; - })(); - - v1beta1.DeleteTaxonomyRequest = (function() { - - /** - * Properties of a DeleteTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeleteTaxonomyRequest - * @property {string|null} [name] DeleteTaxonomyRequest name - */ - - /** - * Constructs a new DeleteTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeleteTaxonomyRequest. - * @implements IDeleteTaxonomyRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest=} [properties] Properties to set - */ - function DeleteTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTaxonomyRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @instance - */ - DeleteTaxonomyRequest.prototype.name = ""; - - /** - * Creates a new DeleteTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} DeleteTaxonomyRequest instance - */ - DeleteTaxonomyRequest.create = function create(properties) { - return new DeleteTaxonomyRequest(properties); - }; - - /** - * Encodes the specified DeleteTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest} message DeleteTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTaxonomyRequest.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 DeleteTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest} message DeleteTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} DeleteTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest(); - 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 DeleteTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} DeleteTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTaxonomyRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTaxonomyRequest.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 DeleteTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} DeleteTaxonomyRequest - */ - DeleteTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest} message DeleteTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTaxonomyRequest.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 DeleteTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest"; - }; - - return DeleteTaxonomyRequest; - })(); - - v1beta1.UpdateTaxonomyRequest = (function() { - - /** - * Properties of an UpdateTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdateTaxonomyRequest - * @property {google.cloud.datacatalog.v1beta1.ITaxonomy|null} [taxonomy] UpdateTaxonomyRequest taxonomy - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaxonomyRequest updateMask - */ - - /** - * Constructs a new UpdateTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdateTaxonomyRequest. - * @implements IUpdateTaxonomyRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest=} [properties] Properties to set - */ - function UpdateTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTaxonomyRequest taxonomy. - * @member {google.cloud.datacatalog.v1beta1.ITaxonomy|null|undefined} taxonomy - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @instance - */ - UpdateTaxonomyRequest.prototype.taxonomy = null; - - /** - * UpdateTaxonomyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @instance - */ - UpdateTaxonomyRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} UpdateTaxonomyRequest instance - */ - UpdateTaxonomyRequest.create = function create(properties) { - return new UpdateTaxonomyRequest(properties); - }; - - /** - * Encodes the specified UpdateTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest} message UpdateTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTaxonomyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomy != null && Object.hasOwnProperty.call(message, "taxonomy")) - $root.google.cloud.datacatalog.v1beta1.Taxonomy.encode(message.taxonomy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest} message UpdateTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} UpdateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} UpdateTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTaxonomyRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTaxonomyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) { - var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.verify(message.taxonomy); - if (error) - return "taxonomy." + 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 UpdateTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} UpdateTaxonomyRequest - */ - UpdateTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest(); - if (object.taxonomy != null) { - if (typeof object.taxonomy !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.taxonomy: object expected"); - message.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.fromObject(object.taxonomy); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest} message UpdateTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTaxonomyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.taxonomy = null; - object.updateMask = null; - } - if (message.taxonomy != null && message.hasOwnProperty("taxonomy")) - object.taxonomy = $root.google.cloud.datacatalog.v1beta1.Taxonomy.toObject(message.taxonomy, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest"; - }; - - return UpdateTaxonomyRequest; - })(); - - v1beta1.ListTaxonomiesRequest = (function() { - - /** - * Properties of a ListTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListTaxonomiesRequest - * @property {string|null} [parent] ListTaxonomiesRequest parent - * @property {number|null} [pageSize] ListTaxonomiesRequest pageSize - * @property {string|null} [pageToken] ListTaxonomiesRequest pageToken - */ - - /** - * Constructs a new ListTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListTaxonomiesRequest. - * @implements IListTaxonomiesRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest=} [properties] Properties to set - */ - function ListTaxonomiesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTaxonomiesRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @instance - */ - ListTaxonomiesRequest.prototype.parent = ""; - - /** - * ListTaxonomiesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @instance - */ - ListTaxonomiesRequest.prototype.pageSize = 0; - - /** - * ListTaxonomiesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @instance - */ - ListTaxonomiesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListTaxonomiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} ListTaxonomiesRequest instance - */ - ListTaxonomiesRequest.create = function create(properties) { - return new ListTaxonomiesRequest(properties); - }; - - /** - * Encodes the specified ListTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest} message ListTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTaxonomiesRequest.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 ListTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest} message ListTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTaxonomiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} ListTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTaxonomiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest(); - 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 ListTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} ListTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTaxonomiesRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTaxonomiesRequest.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 ListTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} ListTaxonomiesRequest - */ - ListTaxonomiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest(); - 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 ListTaxonomiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest} message ListTaxonomiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTaxonomiesRequest.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 ListTaxonomiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @instance - * @returns {Object.} JSON object - */ - ListTaxonomiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTaxonomiesRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTaxonomiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest"; - }; - - return ListTaxonomiesRequest; - })(); - - v1beta1.ListTaxonomiesResponse = (function() { - - /** - * Properties of a ListTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListTaxonomiesResponse - * @property {Array.|null} [taxonomies] ListTaxonomiesResponse taxonomies - * @property {string|null} [nextPageToken] ListTaxonomiesResponse nextPageToken - */ - - /** - * Constructs a new ListTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListTaxonomiesResponse. - * @implements IListTaxonomiesResponse - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse=} [properties] Properties to set - */ - function ListTaxonomiesResponse(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTaxonomiesResponse taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @instance - */ - ListTaxonomiesResponse.prototype.taxonomies = $util.emptyArray; - - /** - * ListTaxonomiesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @instance - */ - ListTaxonomiesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTaxonomiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} ListTaxonomiesResponse instance - */ - ListTaxonomiesResponse.create = function create(properties) { - return new ListTaxonomiesResponse(properties); - }; - - /** - * Encodes the specified ListTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse} message ListTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTaxonomiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - $root.google.cloud.datacatalog.v1beta1.Taxonomy.encode(message.taxonomies[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 ListTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse} message ListTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListTaxonomiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} ListTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTaxonomiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push($root.google.cloud.datacatalog.v1beta1.Taxonomy.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} ListTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTaxonomiesResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTaxonomiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.verify(message.taxonomies[i]); - if (error) - return "taxonomies." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} ListTaxonomiesResponse - */ - ListTaxonomiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse(); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) { - if (typeof object.taxonomies[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.taxonomies: object expected"); - message.taxonomies[i] = $root.google.cloud.datacatalog.v1beta1.Taxonomy.fromObject(object.taxonomies[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListTaxonomiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse} message ListTaxonomiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTaxonomiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = $root.google.cloud.datacatalog.v1beta1.Taxonomy.toObject(message.taxonomies[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListTaxonomiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @instance - * @returns {Object.} JSON object - */ - ListTaxonomiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTaxonomiesResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTaxonomiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse"; - }; - - return ListTaxonomiesResponse; - })(); - - v1beta1.GetTaxonomyRequest = (function() { - - /** - * Properties of a GetTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGetTaxonomyRequest - * @property {string|null} [name] GetTaxonomyRequest name - */ - - /** - * Constructs a new GetTaxonomyRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GetTaxonomyRequest. - * @implements IGetTaxonomyRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest=} [properties] Properties to set - */ - function GetTaxonomyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTaxonomyRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @instance - */ - GetTaxonomyRequest.prototype.name = ""; - - /** - * Creates a new GetTaxonomyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} GetTaxonomyRequest instance - */ - GetTaxonomyRequest.create = function create(properties) { - return new GetTaxonomyRequest(properties); - }; - - /** - * Encodes the specified GetTaxonomyRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTaxonomyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest} message GetTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTaxonomyRequest.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 GetTaxonomyRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetTaxonomyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest} message GetTaxonomyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTaxonomyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetTaxonomyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} GetTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTaxonomyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest(); - 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 GetTaxonomyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} GetTaxonomyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTaxonomyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTaxonomyRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTaxonomyRequest.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 GetTaxonomyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} GetTaxonomyRequest - */ - GetTaxonomyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetTaxonomyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.GetTaxonomyRequest} message GetTaxonomyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTaxonomyRequest.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 GetTaxonomyRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @instance - * @returns {Object.} JSON object - */ - GetTaxonomyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetTaxonomyRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.GetTaxonomyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTaxonomyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.GetTaxonomyRequest"; - }; - - return GetTaxonomyRequest; - })(); - - v1beta1.CreatePolicyTagRequest = (function() { - - /** - * Properties of a CreatePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ICreatePolicyTagRequest - * @property {string|null} [parent] CreatePolicyTagRequest parent - * @property {google.cloud.datacatalog.v1beta1.IPolicyTag|null} [policyTag] CreatePolicyTagRequest policyTag - */ - - /** - * Constructs a new CreatePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a CreatePolicyTagRequest. - * @implements ICreatePolicyTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest=} [properties] Properties to set - */ - function CreatePolicyTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreatePolicyTagRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @instance - */ - CreatePolicyTagRequest.prototype.parent = ""; - - /** - * CreatePolicyTagRequest policyTag. - * @member {google.cloud.datacatalog.v1beta1.IPolicyTag|null|undefined} policyTag - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @instance - */ - CreatePolicyTagRequest.prototype.policyTag = null; - - /** - * Creates a new CreatePolicyTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} CreatePolicyTagRequest instance - */ - CreatePolicyTagRequest.create = function create(properties) { - return new CreatePolicyTagRequest(properties); - }; - - /** - * Encodes the specified CreatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest} message CreatePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePolicyTagRequest.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.policyTag != null && Object.hasOwnProperty.call(message, "policyTag")) - $root.google.cloud.datacatalog.v1beta1.PolicyTag.encode(message.policyTag, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest} message CreatePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreatePolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreatePolicyTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} CreatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePolicyTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreatePolicyTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} CreatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreatePolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreatePolicyTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreatePolicyTagRequest.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.policyTag != null && message.hasOwnProperty("policyTag")) { - var error = $root.google.cloud.datacatalog.v1beta1.PolicyTag.verify(message.policyTag); - if (error) - return "policyTag." + error; - } - return null; - }; - - /** - * Creates a CreatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} CreatePolicyTagRequest - */ - CreatePolicyTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.policyTag != null) { - if (typeof object.policyTag !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.policyTag: object expected"); - message.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.fromObject(object.policyTag); - } - return message; - }; - - /** - * Creates a plain object from a CreatePolicyTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest} message CreatePolicyTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreatePolicyTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.policyTag = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.policyTag != null && message.hasOwnProperty("policyTag")) - object.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.toObject(message.policyTag, options); - return object; - }; - - /** - * Converts this CreatePolicyTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @instance - * @returns {Object.} JSON object - */ - CreatePolicyTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreatePolicyTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreatePolicyTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest"; - }; - - return CreatePolicyTagRequest; - })(); - - v1beta1.DeletePolicyTagRequest = (function() { - - /** - * Properties of a DeletePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IDeletePolicyTagRequest - * @property {string|null} [name] DeletePolicyTagRequest name - */ - - /** - * Constructs a new DeletePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a DeletePolicyTagRequest. - * @implements IDeletePolicyTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest=} [properties] Properties to set - */ - function DeletePolicyTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeletePolicyTagRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @instance - */ - DeletePolicyTagRequest.prototype.name = ""; - - /** - * Creates a new DeletePolicyTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} DeletePolicyTagRequest instance - */ - DeletePolicyTagRequest.create = function create(properties) { - return new DeletePolicyTagRequest(properties); - }; - - /** - * Encodes the specified DeletePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest} message DeletePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePolicyTagRequest.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 DeletePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest} message DeletePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeletePolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeletePolicyTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} DeletePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePolicyTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest(); - 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 DeletePolicyTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} DeletePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeletePolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeletePolicyTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeletePolicyTagRequest.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 DeletePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} DeletePolicyTagRequest - */ - DeletePolicyTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeletePolicyTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest} message DeletePolicyTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeletePolicyTagRequest.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 DeletePolicyTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @instance - * @returns {Object.} JSON object - */ - DeletePolicyTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeletePolicyTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeletePolicyTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest"; - }; - - return DeletePolicyTagRequest; - })(); - - v1beta1.UpdatePolicyTagRequest = (function() { - - /** - * Properties of an UpdatePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IUpdatePolicyTagRequest - * @property {google.cloud.datacatalog.v1beta1.IPolicyTag|null} [policyTag] UpdatePolicyTagRequest policyTag - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePolicyTagRequest updateMask - */ - - /** - * Constructs a new UpdatePolicyTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an UpdatePolicyTagRequest. - * @implements IUpdatePolicyTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest=} [properties] Properties to set - */ - function UpdatePolicyTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdatePolicyTagRequest policyTag. - * @member {google.cloud.datacatalog.v1beta1.IPolicyTag|null|undefined} policyTag - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @instance - */ - UpdatePolicyTagRequest.prototype.policyTag = null; - - /** - * UpdatePolicyTagRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @instance - */ - UpdatePolicyTagRequest.prototype.updateMask = null; - - /** - * Creates a new UpdatePolicyTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} UpdatePolicyTagRequest instance - */ - UpdatePolicyTagRequest.create = function create(properties) { - return new UpdatePolicyTagRequest(properties); - }; - - /** - * Encodes the specified UpdatePolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest} message UpdatePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePolicyTagRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.policyTag != null && Object.hasOwnProperty.call(message, "policyTag")) - $root.google.cloud.datacatalog.v1beta1.PolicyTag.encode(message.policyTag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdatePolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest} message UpdatePolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} UpdatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePolicyTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdatePolicyTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} UpdatePolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdatePolicyTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdatePolicyTagRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.policyTag != null && message.hasOwnProperty("policyTag")) { - var error = $root.google.cloud.datacatalog.v1beta1.PolicyTag.verify(message.policyTag); - if (error) - return "policyTag." + 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 UpdatePolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} UpdatePolicyTagRequest - */ - UpdatePolicyTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest(); - if (object.policyTag != null) { - if (typeof object.policyTag !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.policyTag: object expected"); - message.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.fromObject(object.policyTag); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdatePolicyTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest} message UpdatePolicyTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdatePolicyTagRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.policyTag = null; - object.updateMask = null; - } - if (message.policyTag != null && message.hasOwnProperty("policyTag")) - object.policyTag = $root.google.cloud.datacatalog.v1beta1.PolicyTag.toObject(message.policyTag, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdatePolicyTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @instance - * @returns {Object.} JSON object - */ - UpdatePolicyTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdatePolicyTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdatePolicyTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest"; - }; - - return UpdatePolicyTagRequest; - })(); - - v1beta1.ListPolicyTagsRequest = (function() { - - /** - * Properties of a ListPolicyTagsRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListPolicyTagsRequest - * @property {string|null} [parent] ListPolicyTagsRequest parent - * @property {number|null} [pageSize] ListPolicyTagsRequest pageSize - * @property {string|null} [pageToken] ListPolicyTagsRequest pageToken - */ - - /** - * Constructs a new ListPolicyTagsRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListPolicyTagsRequest. - * @implements IListPolicyTagsRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest=} [properties] Properties to set - */ - function ListPolicyTagsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPolicyTagsRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @instance - */ - ListPolicyTagsRequest.prototype.parent = ""; - - /** - * ListPolicyTagsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @instance - */ - ListPolicyTagsRequest.prototype.pageSize = 0; - - /** - * ListPolicyTagsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @instance - */ - ListPolicyTagsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListPolicyTagsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} ListPolicyTagsRequest instance - */ - ListPolicyTagsRequest.create = function create(properties) { - return new ListPolicyTagsRequest(properties); - }; - - /** - * Encodes the specified ListPolicyTagsRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest} message ListPolicyTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPolicyTagsRequest.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 ListPolicyTagsRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest} message ListPolicyTagsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPolicyTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPolicyTagsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} ListPolicyTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPolicyTagsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest(); - 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 ListPolicyTagsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} ListPolicyTagsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPolicyTagsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPolicyTagsRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPolicyTagsRequest.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 ListPolicyTagsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} ListPolicyTagsRequest - */ - ListPolicyTagsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest(); - 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 ListPolicyTagsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest} message ListPolicyTagsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPolicyTagsRequest.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 ListPolicyTagsRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @instance - * @returns {Object.} JSON object - */ - ListPolicyTagsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPolicyTagsRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPolicyTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest"; - }; - - return ListPolicyTagsRequest; - })(); - - v1beta1.ListPolicyTagsResponse = (function() { - - /** - * Properties of a ListPolicyTagsResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IListPolicyTagsResponse - * @property {Array.|null} [policyTags] ListPolicyTagsResponse policyTags - * @property {string|null} [nextPageToken] ListPolicyTagsResponse nextPageToken - */ - - /** - * Constructs a new ListPolicyTagsResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a ListPolicyTagsResponse. - * @implements IListPolicyTagsResponse - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse=} [properties] Properties to set - */ - function ListPolicyTagsResponse(properties) { - this.policyTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListPolicyTagsResponse policyTags. - * @member {Array.} policyTags - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @instance - */ - ListPolicyTagsResponse.prototype.policyTags = $util.emptyArray; - - /** - * ListPolicyTagsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @instance - */ - ListPolicyTagsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListPolicyTagsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} ListPolicyTagsResponse instance - */ - ListPolicyTagsResponse.create = function create(properties) { - return new ListPolicyTagsResponse(properties); - }; - - /** - * Encodes the specified ListPolicyTagsResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse} message ListPolicyTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPolicyTagsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.policyTags != null && message.policyTags.length) - for (var i = 0; i < message.policyTags.length; ++i) - $root.google.cloud.datacatalog.v1beta1.PolicyTag.encode(message.policyTags[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 ListPolicyTagsResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse} message ListPolicyTagsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPolicyTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPolicyTagsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} ListPolicyTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPolicyTagsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.policyTags && message.policyTags.length)) - message.policyTags = []; - message.policyTags.push($root.google.cloud.datacatalog.v1beta1.PolicyTag.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListPolicyTagsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} ListPolicyTagsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPolicyTagsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListPolicyTagsResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListPolicyTagsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.policyTags != null && message.hasOwnProperty("policyTags")) { - if (!Array.isArray(message.policyTags)) - return "policyTags: array expected"; - for (var i = 0; i < message.policyTags.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.PolicyTag.verify(message.policyTags[i]); - if (error) - return "policyTags." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListPolicyTagsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} ListPolicyTagsResponse - */ - ListPolicyTagsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse(); - if (object.policyTags) { - if (!Array.isArray(object.policyTags)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.policyTags: array expected"); - message.policyTags = []; - for (var i = 0; i < object.policyTags.length; ++i) { - if (typeof object.policyTags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.policyTags: object expected"); - message.policyTags[i] = $root.google.cloud.datacatalog.v1beta1.PolicyTag.fromObject(object.policyTags[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListPolicyTagsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse} message ListPolicyTagsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListPolicyTagsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.policyTags = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.policyTags && message.policyTags.length) { - object.policyTags = []; - for (var j = 0; j < message.policyTags.length; ++j) - object.policyTags[j] = $root.google.cloud.datacatalog.v1beta1.PolicyTag.toObject(message.policyTags[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListPolicyTagsResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @instance - * @returns {Object.} JSON object - */ - ListPolicyTagsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListPolicyTagsResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListPolicyTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse"; - }; - - return ListPolicyTagsResponse; - })(); - - v1beta1.GetPolicyTagRequest = (function() { - - /** - * Properties of a GetPolicyTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IGetPolicyTagRequest - * @property {string|null} [name] GetPolicyTagRequest name - */ - - /** - * Constructs a new GetPolicyTagRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a GetPolicyTagRequest. - * @implements IGetPolicyTagRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest=} [properties] Properties to set - */ - function GetPolicyTagRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPolicyTagRequest name. - * @member {string} name - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @instance - */ - GetPolicyTagRequest.prototype.name = ""; - - /** - * Creates a new GetPolicyTagRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} GetPolicyTagRequest instance - */ - GetPolicyTagRequest.create = function create(properties) { - return new GetPolicyTagRequest(properties); - }; - - /** - * Encodes the specified GetPolicyTagRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetPolicyTagRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest} message GetPolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyTagRequest.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 GetPolicyTagRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.GetPolicyTagRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest} message GetPolicyTagRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyTagRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPolicyTagRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} GetPolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyTagRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest(); - 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 GetPolicyTagRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} GetPolicyTagRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyTagRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPolicyTagRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPolicyTagRequest.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 GetPolicyTagRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} GetPolicyTagRequest - */ - GetPolicyTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetPolicyTagRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.GetPolicyTagRequest} message GetPolicyTagRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPolicyTagRequest.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 GetPolicyTagRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @instance - * @returns {Object.} JSON object - */ - GetPolicyTagRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPolicyTagRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.GetPolicyTagRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPolicyTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.GetPolicyTagRequest"; - }; - - return GetPolicyTagRequest; - })(); - - v1beta1.PolicyTagManagerSerialization = (function() { - - /** - * Constructs a new PolicyTagManagerSerialization service. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a PolicyTagManagerSerialization - * @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 PolicyTagManagerSerialization(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (PolicyTagManagerSerialization.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PolicyTagManagerSerialization; - - /** - * Creates new PolicyTagManagerSerialization service using the specified rpc implementation. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization - * @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 {PolicyTagManagerSerialization} RPC service. Useful where requests and/or responses are streamed. - */ - PolicyTagManagerSerialization.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization|importTaxonomies}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization - * @typedef ImportTaxonomiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} [response] ImportTaxonomiesResponse - */ - - /** - * Calls ImportTaxonomies. - * @function importTaxonomies - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest} request ImportTaxonomiesRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomiesCallback} callback Node-style callback called with the error, if any, and ImportTaxonomiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManagerSerialization.prototype.importTaxonomies = function importTaxonomies(request, callback) { - return this.rpcCall(importTaxonomies, $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest, $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse, request, callback); - }, "name", { value: "ImportTaxonomies" }); - - /** - * Calls ImportTaxonomies. - * @function importTaxonomies - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest} request ImportTaxonomiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization|exportTaxonomies}. - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization - * @typedef ExportTaxonomiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} [response] ExportTaxonomiesResponse - */ - - /** - * Calls ExportTaxonomies. - * @function exportTaxonomies - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest} request ExportTaxonomiesRequest message or plain object - * @param {google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomiesCallback} callback Node-style callback called with the error, if any, and ExportTaxonomiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PolicyTagManagerSerialization.prototype.exportTaxonomies = function exportTaxonomies(request, callback) { - return this.rpcCall(exportTaxonomies, $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest, $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse, request, callback); - }, "name", { value: "ExportTaxonomies" }); - - /** - * Calls ExportTaxonomies. - * @function exportTaxonomies - * @memberof google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization - * @instance - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest} request ExportTaxonomiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return PolicyTagManagerSerialization; - })(); - - v1beta1.SerializedTaxonomy = (function() { - - /** - * Properties of a SerializedTaxonomy. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISerializedTaxonomy - * @property {string|null} [displayName] SerializedTaxonomy displayName - * @property {string|null} [description] SerializedTaxonomy description - * @property {Array.|null} [policyTags] SerializedTaxonomy policyTags - */ - - /** - * Constructs a new SerializedTaxonomy. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SerializedTaxonomy. - * @implements ISerializedTaxonomy - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISerializedTaxonomy=} [properties] Properties to set - */ - function SerializedTaxonomy(properties) { - this.policyTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SerializedTaxonomy displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @instance - */ - SerializedTaxonomy.prototype.displayName = ""; - - /** - * SerializedTaxonomy description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @instance - */ - SerializedTaxonomy.prototype.description = ""; - - /** - * SerializedTaxonomy policyTags. - * @member {Array.} policyTags - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @instance - */ - SerializedTaxonomy.prototype.policyTags = $util.emptyArray; - - /** - * Creates a new SerializedTaxonomy instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @static - * @param {google.cloud.datacatalog.v1beta1.ISerializedTaxonomy=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} SerializedTaxonomy instance - */ - SerializedTaxonomy.create = function create(properties) { - return new SerializedTaxonomy(properties); - }; - - /** - * Encodes the specified SerializedTaxonomy message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @static - * @param {google.cloud.datacatalog.v1beta1.ISerializedTaxonomy} message SerializedTaxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SerializedTaxonomy.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.policyTags != null && message.policyTags.length) - for (var i = 0; i < message.policyTags.length; ++i) - $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.encode(message.policyTags[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SerializedTaxonomy message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @static - * @param {google.cloud.datacatalog.v1beta1.ISerializedTaxonomy} message SerializedTaxonomy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SerializedTaxonomy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SerializedTaxonomy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} SerializedTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SerializedTaxonomy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - if (!(message.policyTags && message.policyTags.length)) - message.policyTags = []; - message.policyTags.push($root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SerializedTaxonomy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} SerializedTaxonomy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SerializedTaxonomy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SerializedTaxonomy message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SerializedTaxonomy.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.policyTags != null && message.hasOwnProperty("policyTags")) { - if (!Array.isArray(message.policyTags)) - return "policyTags: array expected"; - for (var i = 0; i < message.policyTags.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify(message.policyTags[i]); - if (error) - return "policyTags." + error; - } - } - return null; - }; - - /** - * Creates a SerializedTaxonomy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} SerializedTaxonomy - */ - SerializedTaxonomy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.policyTags) { - if (!Array.isArray(object.policyTags)) - throw TypeError(".google.cloud.datacatalog.v1beta1.SerializedTaxonomy.policyTags: array expected"); - message.policyTags = []; - for (var i = 0; i < object.policyTags.length; ++i) { - if (typeof object.policyTags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SerializedTaxonomy.policyTags: object expected"); - message.policyTags[i] = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.fromObject(object.policyTags[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SerializedTaxonomy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @static - * @param {google.cloud.datacatalog.v1beta1.SerializedTaxonomy} message SerializedTaxonomy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SerializedTaxonomy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.policyTags = []; - if (options.defaults) { - object.displayName = ""; - object.description = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.policyTags && message.policyTags.length) { - object.policyTags = []; - for (var j = 0; j < message.policyTags.length; ++j) - object.policyTags[j] = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.toObject(message.policyTags[j], options); - } - return object; - }; - - /** - * Converts this SerializedTaxonomy to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @instance - * @returns {Object.} JSON object - */ - SerializedTaxonomy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SerializedTaxonomy - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.SerializedTaxonomy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SerializedTaxonomy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.SerializedTaxonomy"; - }; - - return SerializedTaxonomy; - })(); - - v1beta1.SerializedPolicyTag = (function() { - - /** - * Properties of a SerializedPolicyTag. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface ISerializedPolicyTag - * @property {string|null} [displayName] SerializedPolicyTag displayName - * @property {string|null} [description] SerializedPolicyTag description - * @property {Array.|null} [childPolicyTags] SerializedPolicyTag childPolicyTags - */ - - /** - * Constructs a new SerializedPolicyTag. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents a SerializedPolicyTag. - * @implements ISerializedPolicyTag - * @constructor - * @param {google.cloud.datacatalog.v1beta1.ISerializedPolicyTag=} [properties] Properties to set - */ - function SerializedPolicyTag(properties) { - this.childPolicyTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SerializedPolicyTag displayName. - * @member {string} displayName - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @instance - */ - SerializedPolicyTag.prototype.displayName = ""; - - /** - * SerializedPolicyTag description. - * @member {string} description - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @instance - */ - SerializedPolicyTag.prototype.description = ""; - - /** - * SerializedPolicyTag childPolicyTags. - * @member {Array.} childPolicyTags - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @instance - */ - SerializedPolicyTag.prototype.childPolicyTags = $util.emptyArray; - - /** - * Creates a new SerializedPolicyTag instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @static - * @param {google.cloud.datacatalog.v1beta1.ISerializedPolicyTag=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} SerializedPolicyTag instance - */ - SerializedPolicyTag.create = function create(properties) { - return new SerializedPolicyTag(properties); - }; - - /** - * Encodes the specified SerializedPolicyTag message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @static - * @param {google.cloud.datacatalog.v1beta1.ISerializedPolicyTag} message SerializedPolicyTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SerializedPolicyTag.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.childPolicyTags != null && message.childPolicyTags.length) - for (var i = 0; i < message.childPolicyTags.length; ++i) - $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.encode(message.childPolicyTags[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SerializedPolicyTag message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @static - * @param {google.cloud.datacatalog.v1beta1.ISerializedPolicyTag} message SerializedPolicyTag message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SerializedPolicyTag.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SerializedPolicyTag message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} SerializedPolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SerializedPolicyTag.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - if (!(message.childPolicyTags && message.childPolicyTags.length)) - message.childPolicyTags = []; - message.childPolicyTags.push($root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SerializedPolicyTag message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} SerializedPolicyTag - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SerializedPolicyTag.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SerializedPolicyTag message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SerializedPolicyTag.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.childPolicyTags != null && message.hasOwnProperty("childPolicyTags")) { - if (!Array.isArray(message.childPolicyTags)) - return "childPolicyTags: array expected"; - for (var i = 0; i < message.childPolicyTags.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.verify(message.childPolicyTags[i]); - if (error) - return "childPolicyTags." + error; - } - } - return null; - }; - - /** - * Creates a SerializedPolicyTag message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} SerializedPolicyTag - */ - SerializedPolicyTag.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.childPolicyTags) { - if (!Array.isArray(object.childPolicyTags)) - throw TypeError(".google.cloud.datacatalog.v1beta1.SerializedPolicyTag.childPolicyTags: array expected"); - message.childPolicyTags = []; - for (var i = 0; i < object.childPolicyTags.length; ++i) { - if (typeof object.childPolicyTags[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.SerializedPolicyTag.childPolicyTags: object expected"); - message.childPolicyTags[i] = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.fromObject(object.childPolicyTags[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SerializedPolicyTag message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @static - * @param {google.cloud.datacatalog.v1beta1.SerializedPolicyTag} message SerializedPolicyTag - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SerializedPolicyTag.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.childPolicyTags = []; - if (options.defaults) { - object.displayName = ""; - object.description = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.childPolicyTags && message.childPolicyTags.length) { - object.childPolicyTags = []; - for (var j = 0; j < message.childPolicyTags.length; ++j) - object.childPolicyTags[j] = $root.google.cloud.datacatalog.v1beta1.SerializedPolicyTag.toObject(message.childPolicyTags[j], options); - } - return object; - }; - - /** - * Converts this SerializedPolicyTag to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @instance - * @returns {Object.} JSON object - */ - SerializedPolicyTag.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SerializedPolicyTag - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.SerializedPolicyTag - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SerializedPolicyTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.SerializedPolicyTag"; - }; - - return SerializedPolicyTag; - })(); - - v1beta1.ImportTaxonomiesRequest = (function() { - - /** - * Properties of an ImportTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IImportTaxonomiesRequest - * @property {string|null} [parent] ImportTaxonomiesRequest parent - * @property {google.cloud.datacatalog.v1beta1.IInlineSource|null} [inlineSource] ImportTaxonomiesRequest inlineSource - */ - - /** - * Constructs a new ImportTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an ImportTaxonomiesRequest. - * @implements IImportTaxonomiesRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest=} [properties] Properties to set - */ - function ImportTaxonomiesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportTaxonomiesRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @instance - */ - ImportTaxonomiesRequest.prototype.parent = ""; - - /** - * ImportTaxonomiesRequest inlineSource. - * @member {google.cloud.datacatalog.v1beta1.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @instance - */ - ImportTaxonomiesRequest.prototype.inlineSource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportTaxonomiesRequest source. - * @member {"inlineSource"|undefined} source - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @instance - */ - Object.defineProperty(ImportTaxonomiesRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ImportTaxonomiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} ImportTaxonomiesRequest instance - */ - ImportTaxonomiesRequest.create = function create(properties) { - return new ImportTaxonomiesRequest(properties); - }; - - /** - * Encodes the specified ImportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest} message ImportTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportTaxonomiesRequest.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.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.datacatalog.v1beta1.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest} message ImportTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} ImportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportTaxonomiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.inlineSource = $root.google.cloud.datacatalog.v1beta1.InlineSource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} ImportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportTaxonomiesRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportTaxonomiesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - properties.source = 1; - { - var error = $root.google.cloud.datacatalog.v1beta1.InlineSource.verify(message.inlineSource); - if (error) - return "inlineSource." + error; - } - } - return null; - }; - - /** - * Creates an ImportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} ImportTaxonomiesRequest - */ - ImportTaxonomiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.inlineSource != null) { - if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.datacatalog.v1beta1.InlineSource.fromObject(object.inlineSource); - } - return message; - }; - - /** - * Creates a plain object from an ImportTaxonomiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest} message ImportTaxonomiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportTaxonomiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.datacatalog.v1beta1.InlineSource.toObject(message.inlineSource, options); - if (options.oneofs) - object.source = "inlineSource"; - } - return object; - }; - - /** - * Converts this ImportTaxonomiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @instance - * @returns {Object.} JSON object - */ - ImportTaxonomiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportTaxonomiesRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportTaxonomiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest"; - }; - - return ImportTaxonomiesRequest; - })(); - - v1beta1.InlineSource = (function() { - - /** - * Properties of an InlineSource. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IInlineSource - * @property {Array.|null} [taxonomies] InlineSource taxonomies - */ - - /** - * Constructs a new InlineSource. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an InlineSource. - * @implements IInlineSource - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IInlineSource=} [properties] Properties to set - */ - function InlineSource(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InlineSource taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @instance - */ - InlineSource.prototype.taxonomies = $util.emptyArray; - - /** - * Creates a new InlineSource instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @static - * @param {google.cloud.datacatalog.v1beta1.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.InlineSource} InlineSource instance - */ - InlineSource.create = function create(properties) { - return new InlineSource(properties); - }; - - /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.InlineSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @static - * @param {google.cloud.datacatalog.v1beta1.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.InlineSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @static - * @param {google.cloud.datacatalog.v1beta1.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InlineSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.InlineSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push($root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InlineSource message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InlineSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify(message.taxonomies[i]); - if (error) - return "taxonomies." + error; - } - } - return null; - }; - - /** - * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.InlineSource} InlineSource - */ - InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.InlineSource) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.InlineSource(); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1beta1.InlineSource.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) { - if (typeof object.taxonomies[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.InlineSource.taxonomies: object expected"); - message.taxonomies[i] = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.fromObject(object.taxonomies[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @static - * @param {google.cloud.datacatalog.v1beta1.InlineSource} message InlineSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InlineSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.toObject(message.taxonomies[j], options); - } - return object; - }; - - /** - * Converts this InlineSource to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @instance - * @returns {Object.} JSON object - */ - InlineSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InlineSource - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.InlineSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.InlineSource"; - }; - - return InlineSource; - })(); - - v1beta1.ImportTaxonomiesResponse = (function() { - - /** - * Properties of an ImportTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IImportTaxonomiesResponse - * @property {Array.|null} [taxonomies] ImportTaxonomiesResponse taxonomies - */ - - /** - * Constructs a new ImportTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an ImportTaxonomiesResponse. - * @implements IImportTaxonomiesResponse - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse=} [properties] Properties to set - */ - function ImportTaxonomiesResponse(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImportTaxonomiesResponse taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @instance - */ - ImportTaxonomiesResponse.prototype.taxonomies = $util.emptyArray; - - /** - * Creates a new ImportTaxonomiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} ImportTaxonomiesResponse instance - */ - ImportTaxonomiesResponse.create = function create(properties) { - return new ImportTaxonomiesResponse(properties); - }; - - /** - * Encodes the specified ImportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse} message ImportTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportTaxonomiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - $root.google.cloud.datacatalog.v1beta1.Taxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ImportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse} message ImportTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImportTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} ImportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportTaxonomiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push($root.google.cloud.datacatalog.v1beta1.Taxonomy.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImportTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} ImportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImportTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImportTaxonomiesResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImportTaxonomiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.Taxonomy.verify(message.taxonomies[i]); - if (error) - return "taxonomies." + error; - } - } - return null; - }; - - /** - * Creates an ImportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} ImportTaxonomiesResponse - */ - ImportTaxonomiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse(); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) { - if (typeof object.taxonomies[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.taxonomies: object expected"); - message.taxonomies[i] = $root.google.cloud.datacatalog.v1beta1.Taxonomy.fromObject(object.taxonomies[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ImportTaxonomiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse} message ImportTaxonomiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportTaxonomiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = $root.google.cloud.datacatalog.v1beta1.Taxonomy.toObject(message.taxonomies[j], options); - } - return object; - }; - - /** - * Converts this ImportTaxonomiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @instance - * @returns {Object.} JSON object - */ - ImportTaxonomiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImportTaxonomiesResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImportTaxonomiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse"; - }; - - return ImportTaxonomiesResponse; - })(); - - v1beta1.ExportTaxonomiesRequest = (function() { - - /** - * Properties of an ExportTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IExportTaxonomiesRequest - * @property {string|null} [parent] ExportTaxonomiesRequest parent - * @property {Array.|null} [taxonomies] ExportTaxonomiesRequest taxonomies - * @property {boolean|null} [serializedTaxonomies] ExportTaxonomiesRequest serializedTaxonomies - */ - - /** - * Constructs a new ExportTaxonomiesRequest. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an ExportTaxonomiesRequest. - * @implements IExportTaxonomiesRequest - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest=} [properties] Properties to set - */ - function ExportTaxonomiesRequest(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportTaxonomiesRequest parent. - * @member {string} parent - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @instance - */ - ExportTaxonomiesRequest.prototype.parent = ""; - - /** - * ExportTaxonomiesRequest taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @instance - */ - ExportTaxonomiesRequest.prototype.taxonomies = $util.emptyArray; - - /** - * ExportTaxonomiesRequest serializedTaxonomies. - * @member {boolean|null|undefined} serializedTaxonomies - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @instance - */ - ExportTaxonomiesRequest.prototype.serializedTaxonomies = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ExportTaxonomiesRequest destination. - * @member {"serializedTaxonomies"|undefined} destination - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @instance - */ - Object.defineProperty(ExportTaxonomiesRequest.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["serializedTaxonomies"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ExportTaxonomiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} ExportTaxonomiesRequest instance - */ - ExportTaxonomiesRequest.create = function create(properties) { - return new ExportTaxonomiesRequest(properties); - }; - - /** - * Encodes the specified ExportTaxonomiesRequest message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest} message ExportTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTaxonomiesRequest.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.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taxonomies[i]); - if (message.serializedTaxonomies != null && Object.hasOwnProperty.call(message, "serializedTaxonomies")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.serializedTaxonomies); - return writer; - }; - - /** - * Encodes the specified ExportTaxonomiesRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest} message ExportTaxonomiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTaxonomiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} ExportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTaxonomiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push(reader.string()); - break; - } - case 3: { - message.serializedTaxonomies = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportTaxonomiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} ExportTaxonomiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTaxonomiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportTaxonomiesRequest message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportTaxonomiesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) - if (!$util.isString(message.taxonomies[i])) - return "taxonomies: string[] expected"; - } - if (message.serializedTaxonomies != null && message.hasOwnProperty("serializedTaxonomies")) { - properties.destination = 1; - if (typeof message.serializedTaxonomies !== "boolean") - return "serializedTaxonomies: boolean expected"; - } - return null; - }; - - /** - * Creates an ExportTaxonomiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} ExportTaxonomiesRequest - */ - ExportTaxonomiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) - message.taxonomies[i] = String(object.taxonomies[i]); - } - if (object.serializedTaxonomies != null) - message.serializedTaxonomies = Boolean(object.serializedTaxonomies); - return message; - }; - - /** - * Creates a plain object from an ExportTaxonomiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @static - * @param {google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest} message ExportTaxonomiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportTaxonomiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = message.taxonomies[j]; - } - if (message.serializedTaxonomies != null && message.hasOwnProperty("serializedTaxonomies")) { - object.serializedTaxonomies = message.serializedTaxonomies; - if (options.oneofs) - object.destination = "serializedTaxonomies"; - } - return object; - }; - - /** - * Converts this ExportTaxonomiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @instance - * @returns {Object.} JSON object - */ - ExportTaxonomiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportTaxonomiesRequest - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportTaxonomiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest"; - }; - - return ExportTaxonomiesRequest; - })(); - - v1beta1.ExportTaxonomiesResponse = (function() { - - /** - * Properties of an ExportTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @interface IExportTaxonomiesResponse - * @property {Array.|null} [taxonomies] ExportTaxonomiesResponse taxonomies - */ - - /** - * Constructs a new ExportTaxonomiesResponse. - * @memberof google.cloud.datacatalog.v1beta1 - * @classdesc Represents an ExportTaxonomiesResponse. - * @implements IExportTaxonomiesResponse - * @constructor - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse=} [properties] Properties to set - */ - function ExportTaxonomiesResponse(properties) { - this.taxonomies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExportTaxonomiesResponse taxonomies. - * @member {Array.} taxonomies - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @instance - */ - ExportTaxonomiesResponse.prototype.taxonomies = $util.emptyArray; - - /** - * Creates a new ExportTaxonomiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse=} [properties] Properties to set - * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} ExportTaxonomiesResponse instance - */ - ExportTaxonomiesResponse.create = function create(properties) { - return new ExportTaxonomiesResponse(properties); - }; - - /** - * Encodes the specified ExportTaxonomiesResponse message. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse} message ExportTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTaxonomiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.taxonomies != null && message.taxonomies.length) - for (var i = 0; i < message.taxonomies.length; ++i) - $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.encode(message.taxonomies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExportTaxonomiesResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse} message ExportTaxonomiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTaxonomiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} ExportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTaxonomiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.taxonomies && message.taxonomies.length)) - message.taxonomies = []; - message.taxonomies.push($root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExportTaxonomiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} ExportTaxonomiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTaxonomiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExportTaxonomiesResponse message. - * @function verify - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportTaxonomiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.taxonomies != null && message.hasOwnProperty("taxonomies")) { - if (!Array.isArray(message.taxonomies)) - return "taxonomies: array expected"; - for (var i = 0; i < message.taxonomies.length; ++i) { - var error = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.verify(message.taxonomies[i]); - if (error) - return "taxonomies." + error; - } - } - return null; - }; - - /** - * Creates an ExportTaxonomiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} ExportTaxonomiesResponse - */ - ExportTaxonomiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse) - return object; - var message = new $root.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse(); - if (object.taxonomies) { - if (!Array.isArray(object.taxonomies)) - throw TypeError(".google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.taxonomies: array expected"); - message.taxonomies = []; - for (var i = 0; i < object.taxonomies.length; ++i) { - if (typeof object.taxonomies[i] !== "object") - throw TypeError(".google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.taxonomies: object expected"); - message.taxonomies[i] = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.fromObject(object.taxonomies[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ExportTaxonomiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @static - * @param {google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse} message ExportTaxonomiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportTaxonomiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.taxonomies = []; - if (message.taxonomies && message.taxonomies.length) { - object.taxonomies = []; - for (var j = 0; j < message.taxonomies.length; ++j) - object.taxonomies[j] = $root.google.cloud.datacatalog.v1beta1.SerializedTaxonomy.toObject(message.taxonomies[j], options); - } - return object; - }; - - /** - * Converts this ExportTaxonomiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @instance - * @returns {Object.} JSON object - */ - ExportTaxonomiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExportTaxonomiesResponse - * @function getTypeUrl - * @memberof google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportTaxonomiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse"; - }; - - return ExportTaxonomiesResponse; - })(); - - return v1beta1; - })(); - - return datacatalog; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - 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; - return values; - })(); - - 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.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; - })(); - - 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 {string|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 {string} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = ""; - - /** - * 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 13, wireType 2 =*/106).string(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 13: { - message.edition = reader.string(); - 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")) - if (!$util.isString(message.edition)) - return "edition: string expected"; - 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); - if (object.edition != null) - message.edition = String(object.edition); - 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 = ""; - } - 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 = 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 - */ - - /** - * 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 = []; - if (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; - - /** - * 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.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; - } - 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; - } - } - 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]); - } - } - 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.uninterpretedOption = []; - 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"; - }; - - 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 2: - case 3: - 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_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - 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_REQUIRED=2 LABEL_REQUIRED value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - 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} [phpGenericServices] FileOptions phpGenericServices - * @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 {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 phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpGenericServices = 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 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.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - 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.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 42: { - message.phpGenericServices = 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 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.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - if (typeof message.phpGenericServices !== "boolean") - return "phpGenericServices: 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.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.phpGenericServices != null) - message.phpGenericServices = Boolean(object.phpGenericServices); - 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.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.phpGenericServices = false; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - } - 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.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - object.phpGenericServices = message.phpGenericServices; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - 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 {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 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.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 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.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.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[".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.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 {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.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 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.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) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - 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 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.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: - 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.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; - } - } - 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.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[".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.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; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @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 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.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 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.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.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 (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 {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 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.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 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.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.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; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - 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 {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 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.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 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.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.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; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - 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 {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 - */ - - /** - * 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 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"] = ""; - - /** - * 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.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"]); - 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 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; - } - 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.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"; - 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.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"]); - 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[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - 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"]; - 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 {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 - */ - - /** - * 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 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; - - /** - * 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.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.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 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; - } - 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.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"; - } - 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.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]); - } - 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[".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.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.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.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.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.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; - })(); - - 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; - })(); - - return protobuf; - })(); - - google.iam = (function() { - - /** - * Namespace iam. - * @memberof google - * @namespace - */ - var iam = {}; - - iam.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.iam - * @namespace - */ - var v1 = {}; - - v1.IAMPolicy = (function() { - - /** - * Constructs a new IAMPolicy service. - * @memberof google.iam.v1 - * @classdesc Represents a IAMPolicy - * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; - - /** - * Creates new IAMPolicy service using the specified rpc implementation. - * @function create - * @memberof google.iam.v1.IAMPolicy - * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. - */ - IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. - * @memberof google.iam.v1.IAMPolicy - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return IAMPolicy; - })(); - - v1.SetIamPolicyRequest = (function() { - - /** - * Properties of a SetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface ISetIamPolicyRequest - * @property {string|null} [resource] SetIamPolicyRequest resource - * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy - * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask - */ - - /** - * Constructs a new SetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a SetIamPolicyRequest. - * @implements ISetIamPolicyRequest - * @constructor - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - */ - function SetIamPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.resource = ""; - - /** - * SetIamPolicyRequest policy. - * @member {google.iam.v1.IPolicy|null|undefined} policy - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.policy = null; - - /** - * SetIamPolicyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.updateMask = null; - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance - */ - SetIamPolicyRequest.create = function create(properties) { - return new SetIamPolicyRequest(properties); - }; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.policy = $root.google.iam.v1.Policy.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 a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) { - var error = $root.google.iam.v1.Policy.verify(message.policy); - if (error) - return "policy." + 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 a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - */ - SetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.SetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.policy != null) { - if (typeof object.policy !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); - message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.policy = null; - object.updateMask = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - SetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; - }; - - return SetIamPolicyRequest; - })(); - - v1.GetIamPolicyRequest = (function() { - - /** - * Properties of a GetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface IGetIamPolicyRequest - * @property {string|null} [resource] GetIamPolicyRequest resource - * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options - */ - - /** - * Constructs a new GetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a GetIamPolicyRequest. - * @implements IGetIamPolicyRequest - * @constructor - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - */ - function GetIamPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.resource = ""; - - /** - * GetIamPolicyRequest options. - * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.options = null; - - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance - */ - GetIamPolicyRequest.create = function create(properties) { - return new GetIamPolicyRequest(properties); - }; - - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - */ - GetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.GetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); - message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.options = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this GetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - GetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; - }; - - return GetIamPolicyRequest; - })(); - - v1.TestIamPermissionsRequest = (function() { - - /** - * Properties of a TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsRequest - * @property {string|null} [resource] TestIamPermissionsRequest resource - * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions - */ - - /** - * Constructs a new TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsRequest. - * @implements ITestIamPermissionsRequest - * @constructor - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - */ - function TestIamPermissionsRequest(properties) { - this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TestIamPermissionsRequest resource. - * @member {string} resource - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.resource = ""; - - /** - * TestIamPermissionsRequest permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; - - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance - */ - TestIamPermissionsRequest.create = function create(properties) { - return new TestIamPermissionsRequest(properties); - }; - - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TestIamPermissionsRequest message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - */ - TestIamPermissionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) - object.resource = ""; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this TestIamPermissionsRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TestIamPermissionsRequest - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; - }; - - return TestIamPermissionsRequest; - })(); - - v1.TestIamPermissionsResponse = (function() { - - /** - * Properties of a TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsResponse - * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions - */ - - /** - * Constructs a new TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsResponse. - * @implements ITestIamPermissionsResponse - * @constructor - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - */ - function TestIamPermissionsResponse(properties) { - this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TestIamPermissionsResponse permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - */ - TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; - - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance - */ - TestIamPermissionsResponse.create = function create(properties) { - return new TestIamPermissionsResponse(properties); - }; - - /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TestIamPermissionsResponse message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - */ - TestIamPermissionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsResponse(); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this TestIamPermissionsResponse to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TestIamPermissionsResponse - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; - }; - - return TestIamPermissionsResponse; - })(); - - v1.GetPolicyOptions = (function() { - - /** - * Properties of a GetPolicyOptions. - * @memberof google.iam.v1 - * @interface IGetPolicyOptions - * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion - */ - - /** - * Constructs a new GetPolicyOptions. - * @memberof google.iam.v1 - * @classdesc Represents a GetPolicyOptions. - * @implements IGetPolicyOptions - * @constructor - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - */ - function GetPolicyOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPolicyOptions requestedPolicyVersion. - * @member {number} requestedPolicyVersion - * @memberof google.iam.v1.GetPolicyOptions - * @instance - */ - GetPolicyOptions.prototype.requestedPolicyVersion = 0; - - /** - * Creates a new GetPolicyOptions instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance - */ - GetPolicyOptions.create = function create(properties) { - return new GetPolicyOptions(properties); - }; - - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); - return writer; - }; - - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.requestedPolicyVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPolicyOptions message. - * @function verify - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPolicyOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - if (!$util.isInteger(message.requestedPolicyVersion)) - return "requestedPolicyVersion: integer expected"; - return null; - }; - - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - */ - GetPolicyOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetPolicyOptions) - return object; - var message = new $root.google.iam.v1.GetPolicyOptions(); - if (object.requestedPolicyVersion != null) - message.requestedPolicyVersion = object.requestedPolicyVersion | 0; - return message; - }; - - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPolicyOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.requestedPolicyVersion = 0; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - object.requestedPolicyVersion = message.requestedPolicyVersion; - return object; - }; - - /** - * Converts this GetPolicyOptions to JSON. - * @function toJSON - * @memberof google.iam.v1.GetPolicyOptions - * @instance - * @returns {Object.} JSON object - */ - GetPolicyOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPolicyOptions - * @function getTypeUrl - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; - }; - - return GetPolicyOptions; - })(); - - v1.Policy = (function() { - - /** - * Properties of a Policy. - * @memberof google.iam.v1 - * @interface IPolicy - * @property {number|null} [version] Policy version - * @property {Array.|null} [bindings] Policy bindings - * @property {Array.|null} [auditConfigs] Policy auditConfigs - * @property {Uint8Array|null} [etag] Policy etag - */ - - /** - * Constructs a new Policy. - * @memberof google.iam.v1 - * @classdesc Represents a Policy. - * @implements IPolicy - * @constructor - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - */ - function Policy(properties) { - this.bindings = []; - this.auditConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Policy version. - * @member {number} version - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.version = 0; - - /** - * Policy bindings. - * @member {Array.} bindings - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.bindings = $util.emptyArray; - - /** - * Policy auditConfigs. - * @member {Array.} auditConfigs - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.auditConfigs = $util.emptyArray; - - /** - * Policy etag. - * @member {Uint8Array} etag - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.etag = $util.newBuffer([]); - - /** - * Creates a new Policy instance using the specified properties. - * @function create - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - * @returns {google.iam.v1.Policy} Policy instance - */ - Policy.create = function create(properties) { - return new Policy(properties); - }; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); - if (message.bindings != null && message.bindings.length) - for (var i = 0; i < message.bindings.length; ++i) - $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.auditConfigs != null && message.auditConfigs.length) - for (var i = 0; i < message.auditConfigs.length; ++i) - $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.int32(); - break; - } - case 4: { - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.auditConfigs && message.auditConfigs.length)) - message.auditConfigs = []; - message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); - break; - } - case 3: { - message.etag = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Policy message. - * @function verify - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Policy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - if (message.bindings != null && message.hasOwnProperty("bindings")) { - if (!Array.isArray(message.bindings)) - return "bindings: array expected"; - for (var i = 0; i < message.bindings.length; ++i) { - var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); - if (error) - return "bindings." + error; - } - } - if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { - if (!Array.isArray(message.auditConfigs)) - return "auditConfigs: array expected"; - for (var i = 0; i < message.auditConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); - if (error) - return "auditConfigs." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) - return "etag: buffer expected"; - return null; - }; - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Policy} Policy - */ - Policy.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Policy) - return object; - var message = new $root.google.iam.v1.Policy(); - if (object.version != null) - message.version = object.version | 0; - if (object.bindings) { - if (!Array.isArray(object.bindings)) - throw TypeError(".google.iam.v1.Policy.bindings: array expected"); - message.bindings = []; - for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") - throw TypeError(".google.iam.v1.Policy.bindings: object expected"); - message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); - } - } - if (object.auditConfigs) { - if (!Array.isArray(object.auditConfigs)) - throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); - message.auditConfigs = []; - for (var i = 0; i < object.auditConfigs.length; ++i) { - if (typeof object.auditConfigs[i] !== "object") - throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); - message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); - } - } - if (object.etag != null) - if (typeof object.etag === "string") - $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); - else if (object.etag.length >= 0) - message.etag = object.etag; - return message; - }; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.Policy} message Policy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Policy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindings = []; - object.auditConfigs = []; - } - if (options.defaults) { - object.version = 0; - if (options.bytes === String) - object.etag = ""; - else { - object.etag = []; - if (options.bytes !== Array) - object.etag = $util.newBuffer(object.etag); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; - if (message.bindings && message.bindings.length) { - object.bindings = []; - for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); - } - if (message.auditConfigs && message.auditConfigs.length) { - object.auditConfigs = []; - for (var j = 0; j < message.auditConfigs.length; ++j) - object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); - } - return object; - }; - - /** - * Converts this Policy to JSON. - * @function toJSON - * @memberof google.iam.v1.Policy - * @instance - * @returns {Object.} JSON object - */ - Policy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Policy - * @function getTypeUrl - * @memberof google.iam.v1.Policy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Policy"; - }; - - return Policy; - })(); - - v1.Binding = (function() { - - /** - * Properties of a Binding. - * @memberof google.iam.v1 - * @interface IBinding - * @property {string|null} [role] Binding role - * @property {Array.|null} [members] Binding members - * @property {google.type.IExpr|null} [condition] Binding condition - */ - - /** - * Constructs a new Binding. - * @memberof google.iam.v1 - * @classdesc Represents a Binding. - * @implements IBinding - * @constructor - * @param {google.iam.v1.IBinding=} [properties] Properties to set - */ - function Binding(properties) { - this.members = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Binding role. - * @member {string} role - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.role = ""; - - /** - * Binding members. - * @member {Array.} members - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.members = $util.emptyArray; - - /** - * Binding condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.condition = null; - - /** - * Creates a new Binding instance using the specified properties. - * @function create - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding=} [properties] Properties to set - * @returns {google.iam.v1.Binding} Binding instance - */ - Binding.create = function create(properties) { - return new Binding(properties); - }; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); - if (message.members != null && message.members.length) - for (var i = 0; i < message.members.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.role = reader.string(); - break; - } - case 2: { - if (!(message.members && message.members.length)) - message.members = []; - message.members.push(reader.string()); - break; - } - case 3: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Binding message. - * @function verify - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Binding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) - return "members: array expected"; - for (var i = 0; i < message.members.length; ++i) - if (!$util.isString(message.members[i])) - return "members: string[] expected"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Binding} Binding - */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Binding) - return object; - var message = new $root.google.iam.v1.Binding(); - if (object.role != null) - message.role = String(object.role); - if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".google.iam.v1.Binding.members: array expected"); - message.members = []; - for (var i = 0; i < object.members.length; ++i) - message.members[i] = String(object.members[i]); - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.Binding.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.Binding} message Binding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Binding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.members = []; - if (options.defaults) { - object.role = ""; - object.condition = null; - } - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.members && message.members.length) { - object.members = []; - for (var j = 0; j < message.members.length; ++j) - object.members[j] = message.members[j]; - } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this Binding to JSON. - * @function toJSON - * @memberof google.iam.v1.Binding - * @instance - * @returns {Object.} JSON object - */ - Binding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Binding - * @function getTypeUrl - * @memberof google.iam.v1.Binding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Binding"; - }; - - return Binding; - })(); - - v1.AuditConfig = (function() { - - /** - * Properties of an AuditConfig. - * @memberof google.iam.v1 - * @interface IAuditConfig - * @property {string|null} [service] AuditConfig service - * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs - */ - - /** - * Constructs a new AuditConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfig. - * @implements IAuditConfig - * @constructor - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - */ - function AuditConfig(properties) { - this.auditLogConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditConfig service. - * @member {string} service - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.service = ""; - - /** - * AuditConfig auditLogConfigs. - * @member {Array.} auditLogConfigs - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.auditLogConfigs = $util.emptyArray; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfig} AuditConfig instance - */ - AuditConfig.create = function create(properties) { - return new AuditConfig(properties); - }; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.auditLogConfigs != null && message.auditLogConfigs.length) - for (var i = 0; i < message.auditLogConfigs.length; ++i) - $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.service = reader.string(); - break; - } - case 3: { - if (!(message.auditLogConfigs && message.auditLogConfigs.length)) - message.auditLogConfigs = []; - message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfig message. - * @function verify - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { - if (!Array.isArray(message.auditLogConfigs)) - return "auditLogConfigs: array expected"; - for (var i = 0; i < message.auditLogConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); - if (error) - return "auditLogConfigs." + error; - } - } - return null; - }; - - /** - * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfig} AuditConfig - */ - AuditConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfig) - return object; - var message = new $root.google.iam.v1.AuditConfig(); - if (object.service != null) - message.service = String(object.service); - if (object.auditLogConfigs) { - if (!Array.isArray(object.auditLogConfigs)) - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); - message.auditLogConfigs = []; - for (var i = 0; i < object.auditLogConfigs.length; ++i) { - if (typeof object.auditLogConfigs[i] !== "object") - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); - message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.AuditConfig} message AuditConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.auditLogConfigs = []; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.auditLogConfigs && message.auditLogConfigs.length) { - object.auditLogConfigs = []; - for (var j = 0; j < message.auditLogConfigs.length; ++j) - object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); - } - return object; - }; - - /** - * Converts this AuditConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfig - * @instance - * @returns {Object.} JSON object - */ - AuditConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfig"; - }; - - return AuditConfig; - })(); - - v1.AuditLogConfig = (function() { - - /** - * Properties of an AuditLogConfig. - * @memberof google.iam.v1 - * @interface IAuditLogConfig - * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType - * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers - */ - - /** - * Constructs a new AuditLogConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditLogConfig. - * @implements IAuditLogConfig - * @constructor - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - */ - function AuditLogConfig(properties) { - this.exemptedMembers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditLogConfig logType. - * @member {google.iam.v1.AuditLogConfig.LogType} logType - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.logType = 0; - - /** - * AuditLogConfig exemptedMembers. - * @member {Array.} exemptedMembers - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance - */ - AuditLogConfig.create = function create(properties) { - return new AuditLogConfig(properties); - }; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); - if (message.exemptedMembers != null && message.exemptedMembers.length) - for (var i = 0; i < message.exemptedMembers.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); - return writer; - }; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.logType = reader.int32(); - break; - } - case 2: { - if (!(message.exemptedMembers && message.exemptedMembers.length)) - message.exemptedMembers = []; - message.exemptedMembers.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditLogConfig message. - * @function verify - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditLogConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - switch (message.logType) { - default: - return "logType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { - if (!Array.isArray(message.exemptedMembers)) - return "exemptedMembers: array expected"; - for (var i = 0; i < message.exemptedMembers.length; ++i) - if (!$util.isString(message.exemptedMembers[i])) - return "exemptedMembers: string[] expected"; - } - return null; - }; - - /** - * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - */ - AuditLogConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditLogConfig) - return object; - var message = new $root.google.iam.v1.AuditLogConfig(); - switch (object.logType) { - default: - if (typeof object.logType === "number") { - message.logType = object.logType; - break; - } - break; - case "LOG_TYPE_UNSPECIFIED": - case 0: - message.logType = 0; - break; - case "ADMIN_READ": - case 1: - message.logType = 1; - break; - case "DATA_WRITE": - case 2: - message.logType = 2; - break; - case "DATA_READ": - case 3: - message.logType = 3; - break; - } - if (object.exemptedMembers) { - if (!Array.isArray(object.exemptedMembers)) - throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); - message.exemptedMembers = []; - for (var i = 0; i < object.exemptedMembers.length; ++i) - message.exemptedMembers[i] = String(object.exemptedMembers[i]); - } - return message; - }; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditLogConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exemptedMembers = []; - if (options.defaults) - object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; - if (message.exemptedMembers && message.exemptedMembers.length) { - object.exemptedMembers = []; - for (var j = 0; j < message.exemptedMembers.length; ++j) - object.exemptedMembers[j] = message.exemptedMembers[j]; - } - return object; - }; - - /** - * Converts this AuditLogConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditLogConfig - * @instance - * @returns {Object.} JSON object - */ - AuditLogConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditLogConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; - }; - - /** - * LogType enum. - * @name google.iam.v1.AuditLogConfig.LogType - * @enum {number} - * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value - * @property {number} ADMIN_READ=1 ADMIN_READ value - * @property {number} DATA_WRITE=2 DATA_WRITE value - * @property {number} DATA_READ=3 DATA_READ value - */ - AuditLogConfig.LogType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADMIN_READ"] = 1; - values[valuesById[2] = "DATA_WRITE"] = 2; - values[valuesById[3] = "DATA_READ"] = 3; - return values; - })(); - - return AuditLogConfig; - })(); - - v1.PolicyDelta = (function() { - - /** - * Properties of a PolicyDelta. - * @memberof google.iam.v1 - * @interface IPolicyDelta - * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas - * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas - */ - - /** - * Constructs a new PolicyDelta. - * @memberof google.iam.v1 - * @classdesc Represents a PolicyDelta. - * @implements IPolicyDelta - * @constructor - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - */ - function PolicyDelta(properties) { - this.bindingDeltas = []; - this.auditConfigDeltas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PolicyDelta bindingDeltas. - * @member {Array.} bindingDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.bindingDeltas = $util.emptyArray; - - /** - * PolicyDelta auditConfigDeltas. - * @member {Array.} auditConfigDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance - */ - PolicyDelta.create = function create(properties) { - return new PolicyDelta(properties); - }; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bindingDeltas != null && message.bindingDeltas.length) - for (var i = 0; i < message.bindingDeltas.length; ++i) - $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) - for (var i = 0; i < message.auditConfigDeltas.length; ++i) - $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.bindingDeltas && message.bindingDeltas.length)) - message.bindingDeltas = []; - message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PolicyDelta message. - * @function verify - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { - if (!Array.isArray(message.bindingDeltas)) - return "bindingDeltas: array expected"; - for (var i = 0; i < message.bindingDeltas.length; ++i) { - var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); - if (error) - return "bindingDeltas." + error; - } - } - if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { - if (!Array.isArray(message.auditConfigDeltas)) - return "auditConfigDeltas: array expected"; - for (var i = 0; i < message.auditConfigDeltas.length; ++i) { - var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); - if (error) - return "auditConfigDeltas." + error; - } - } - return null; - }; - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - */ - PolicyDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.PolicyDelta) - return object; - var message = new $root.google.iam.v1.PolicyDelta(); - if (object.bindingDeltas) { - if (!Array.isArray(object.bindingDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); - message.bindingDeltas = []; - for (var i = 0; i < object.bindingDeltas.length; ++i) { - if (typeof object.bindingDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); - message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); - } - } - if (object.auditConfigDeltas) { - if (!Array.isArray(object.auditConfigDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); - message.auditConfigDeltas = []; - for (var i = 0; i < object.auditConfigDeltas.length; ++i) { - if (typeof object.auditConfigDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); - message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.PolicyDelta} message PolicyDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindingDeltas = []; - object.auditConfigDeltas = []; - } - if (message.bindingDeltas && message.bindingDeltas.length) { - object.bindingDeltas = []; - for (var j = 0; j < message.bindingDeltas.length; ++j) - object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); - } - if (message.auditConfigDeltas && message.auditConfigDeltas.length) { - object.auditConfigDeltas = []; - for (var j = 0; j < message.auditConfigDeltas.length; ++j) - object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); - } - return object; - }; - - /** - * Converts this PolicyDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.PolicyDelta - * @instance - * @returns {Object.} JSON object - */ - PolicyDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PolicyDelta - * @function getTypeUrl - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; - }; - - return PolicyDelta; - })(); - - v1.BindingDelta = (function() { - - /** - * Properties of a BindingDelta. - * @memberof google.iam.v1 - * @interface IBindingDelta - * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action - * @property {string|null} [role] BindingDelta role - * @property {string|null} [member] BindingDelta member - * @property {google.type.IExpr|null} [condition] BindingDelta condition - */ - - /** - * Constructs a new BindingDelta. - * @memberof google.iam.v1 - * @classdesc Represents a BindingDelta. - * @implements IBindingDelta - * @constructor - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - */ - function BindingDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BindingDelta action. - * @member {google.iam.v1.BindingDelta.Action} action - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.action = 0; - - /** - * BindingDelta role. - * @member {string} role - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.role = ""; - - /** - * BindingDelta member. - * @member {string} member - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.member = ""; - - /** - * BindingDelta condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.condition = null; - - /** - * Creates a new BindingDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - * @returns {google.iam.v1.BindingDelta} BindingDelta instance - */ - BindingDelta.create = function create(properties) { - return new BindingDelta(properties); - }; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && Object.hasOwnProperty.call(message, "member")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.role = reader.string(); - break; - } - case 3: { - message.member = reader.string(); - break; - } - case 4: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BindingDelta message. - * @function verify - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BindingDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.BindingDelta} BindingDelta - */ - BindingDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.BindingDelta) - return object; - var message = new $root.google.iam.v1.BindingDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.role != null) - message.role = String(object.role); - if (object.member != null) - message.member = String(object.member); - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.BindingDelta} message BindingDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BindingDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; - object.condition = null; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this BindingDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.BindingDelta - * @instance - * @returns {Object.} JSON object - */ - BindingDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BindingDelta - * @function getTypeUrl - * @memberof google.iam.v1.BindingDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.BindingDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.BindingDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - BindingDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return BindingDelta; - })(); - - v1.AuditConfigDelta = (function() { - - /** - * Properties of an AuditConfigDelta. - * @memberof google.iam.v1 - * @interface IAuditConfigDelta - * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action - * @property {string|null} [service] AuditConfigDelta service - * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember - * @property {string|null} [logType] AuditConfigDelta logType - */ - - /** - * Constructs a new AuditConfigDelta. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfigDelta. - * @implements IAuditConfigDelta - * @constructor - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - */ - function AuditConfigDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditConfigDelta action. - * @member {google.iam.v1.AuditConfigDelta.Action} action - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.action = 0; - - /** - * AuditConfigDelta service. - * @member {string} service - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.service = ""; - - /** - * AuditConfigDelta exemptedMember. - * @member {string} exemptedMember - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.exemptedMember = ""; - - /** - * AuditConfigDelta logType. - * @member {string} logType - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.logType = ""; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance - */ - AuditConfigDelta.create = function create(properties) { - return new AuditConfigDelta(properties); - }; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); - return writer; - }; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.service = reader.string(); - break; - } - case 3: { - message.exemptedMember = reader.string(); - break; - } - case 4: { - message.logType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfigDelta message. - * @function verify - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfigDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - if (!$util.isString(message.exemptedMember)) - return "exemptedMember: string expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - if (!$util.isString(message.logType)) - return "logType: string expected"; - return null; - }; - - /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - */ - AuditConfigDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfigDelta) - return object; - var message = new $root.google.iam.v1.AuditConfigDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.service != null) - message.service = String(object.service); - if (object.exemptedMember != null) - message.exemptedMember = String(object.exemptedMember); - if (object.logType != null) - message.logType = String(object.logType); - return message; - }; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfigDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.service = ""; - object.exemptedMember = ""; - object.logType = ""; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - object.exemptedMember = message.exemptedMember; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = message.logType; - return object; - }; - - /** - * Converts this AuditConfigDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfigDelta - * @instance - * @returns {Object.} JSON object - */ - AuditConfigDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfigDelta - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.AuditConfigDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - AuditConfigDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return AuditConfigDelta; - })(); - - return v1; - })(); - - return iam; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Expr = (function() { - - /** - * Properties of an Expr. - * @memberof google.type - * @interface IExpr - * @property {string|null} [expression] Expr expression - * @property {string|null} [title] Expr title - * @property {string|null} [description] Expr description - * @property {string|null} [location] Expr location - */ - - /** - * Constructs a new Expr. - * @memberof google.type - * @classdesc Represents an Expr. - * @implements IExpr - * @constructor - * @param {google.type.IExpr=} [properties] Properties to set - */ - function Expr(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Expr expression. - * @member {string} expression - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.expression = ""; - - /** - * Expr title. - * @member {string} title - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.title = ""; - - /** - * Expr description. - * @member {string} description - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.description = ""; - - /** - * Expr location. - * @member {string} location - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.location = ""; - - /** - * Creates a new Expr instance using the specified properties. - * @function create - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr=} [properties] Properties to set - * @returns {google.type.Expr} Expr instance - */ - Expr.create = function create(properties) { - return new Expr(properties); - }; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encode - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); - return writer; - }; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @function decode - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decode = function 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.Expr(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.expression = reader.string(); - break; - } - case 2: { - message.title = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Expr message. - * @function verify - * @memberof google.type.Expr - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Expr.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates an Expr message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Expr - * @static - * @param {Object.} object Plain object - * @returns {google.type.Expr} Expr - */ - Expr.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Expr) - return object; - var message = new $root.google.type.Expr(); - if (object.expression != null) - message.expression = String(object.expression); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Expr - * @static - * @param {google.type.Expr} message Expr - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Expr.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.expression = ""; - object.title = ""; - object.description = ""; - object.location = ""; - } - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this Expr to JSON. - * @function toJSON - * @memberof google.type.Expr - * @instance - * @returns {Object.} JSON object - */ - Expr.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Expr - * @function getTypeUrl - * @memberof google.type.Expr - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Expr"; - }; - - return Expr; - })(); - - return type; - })(); - - return google; - })(); - - return $root; -}); diff --git a/protos/protos.json b/protos/protos.json deleted file mode 100644 index 430c39dd..00000000 --- a/protos/protos.json +++ /dev/null @@ -1,7163 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "datacatalog": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.DataCatalog.V1", - "go_package": "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog", - "java_multiple_files": true, - "java_outer_classname": "PolicyTagManagerSerializationProto", - "java_package": "com.google.cloud.datacatalog.v1", - "php_namespace": "Google\\Cloud\\DataCatalog\\V1", - "ruby_package": "Google::Cloud::DataCatalog::V1", - "(google.api.resource_definition).type": "datacatalog.googleapis.com/TagTemplateFieldEnumValue", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}" - }, - "nested": { - "BigQueryConnectionSpec": { - "oneofs": { - "connectionSpec": { - "oneof": [ - "cloudSql" - ] - } - }, - "fields": { - "connectionType": { - "type": "ConnectionType", - "id": 1 - }, - "cloudSql": { - "type": "CloudSqlBigQueryConnectionSpec", - "id": 2 - }, - "hasCredential": { - "type": "bool", - "id": 3 - } - }, - "nested": { - "ConnectionType": { - "values": { - "CONNECTION_TYPE_UNSPECIFIED": 0, - "CLOUD_SQL": 1 - } - } - } - }, - "CloudSqlBigQueryConnectionSpec": { - "fields": { - "instanceId": { - "type": "string", - "id": 1 - }, - "database": { - "type": "string", - "id": 2 - }, - "type": { - "type": "DatabaseType", - "id": 3 - } - }, - "nested": { - "DatabaseType": { - "values": { - "DATABASE_TYPE_UNSPECIFIED": 0, - "POSTGRES": 1, - "MYSQL": 2 - } - } - } - }, - "BigQueryRoutineSpec": { - "fields": { - "importedLibraries": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "PersonalDetails": { - "fields": { - "starred": { - "type": "bool", - "id": 1 - }, - "starTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - } - } - }, - "IntegratedSystem": { - "values": { - "INTEGRATED_SYSTEM_UNSPECIFIED": 0, - "BIGQUERY": 1, - "CLOUD_PUBSUB": 2, - "DATAPROC_METASTORE": 3, - "DATAPLEX": 4 - } - }, - "DataSource": { - "oneofs": { - "properties": { - "oneof": [ - "storageProperties" - ] - } - }, - "fields": { - "service": { - "type": "Service", - "id": 1 - }, - "resource": { - "type": "string", - "id": 2 - }, - "sourceEntry": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "storageProperties": { - "type": "StorageProperties", - "id": 4 - } - }, - "nested": { - "Service": { - "values": { - "SERVICE_UNSPECIFIED": 0, - "CLOUD_STORAGE": 1, - "BIGQUERY": 2 - } - } - } - }, - "StorageProperties": { - "fields": { - "filePattern": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "fileType": { - "type": "string", - "id": 2 - } - } - }, - "DataCatalog": { - "options": { - "(google.api.default_host)": "datacatalog.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "SearchCatalog": { - "requestType": "SearchCatalogRequest", - "responseType": "SearchCatalogResponse", - "options": { - "(google.api.http).post": "/v1/catalog:search", - "(google.api.http).body": "*", - "(google.api.method_signature)": "scope,query" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/catalog:search", - "body": "*" - } - }, - { - "(google.api.method_signature)": "scope,query" - } - ] - }, - "CreateEntryGroup": { - "requestType": "CreateEntryGroupRequest", - "responseType": "EntryGroup", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/entryGroups", - "(google.api.http).body": "entry_group", - "(google.api.method_signature)": "parent,entry_group_id,entry_group" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/entryGroups", - "body": "entry_group" - } - }, - { - "(google.api.method_signature)": "parent,entry_group_id,entry_group" - } - ] - }, - "GetEntryGroup": { - "requestType": "GetEntryGroupRequest", - "responseType": "EntryGroup", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/entryGroups/*}", - "(google.api.method_signature)": "name,read_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/entryGroups/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.api.method_signature)": "name,read_mask" - } - ] - }, - "UpdateEntryGroup": { - "requestType": "UpdateEntryGroupRequest", - "responseType": "EntryGroup", - "options": { - "(google.api.http).patch": "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}", - "(google.api.http).body": "entry_group", - "(google.api.method_signature)": "entry_group,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}", - "body": "entry_group" - } - }, - { - "(google.api.method_signature)": "entry_group" - }, - { - "(google.api.method_signature)": "entry_group,update_mask" - } - ] - }, - "DeleteEntryGroup": { - "requestType": "DeleteEntryGroupRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryGroups/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/entryGroups/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListEntryGroups": { - "requestType": "ListEntryGroupsRequest", - "responseType": "ListEntryGroupsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/entryGroups", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/entryGroups" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateEntry": { - "requestType": "CreateEntryRequest", - "responseType": "Entry", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries", - "(google.api.http).body": "entry", - "(google.api.method_signature)": "parent,entry_id,entry" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries", - "body": "entry" - } - }, - { - "(google.api.method_signature)": "parent,entry_id,entry" - } - ] - }, - "UpdateEntry": { - "requestType": "UpdateEntryRequest", - "responseType": "Entry", - "options": { - "(google.api.http).patch": "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}", - "(google.api.http).body": "entry", - "(google.api.method_signature)": "entry,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}", - "body": "entry" - } - }, - { - "(google.api.method_signature)": "entry" - }, - { - "(google.api.method_signature)": "entry,update_mask" - } - ] - }, - "DeleteEntry": { - "requestType": "DeleteEntryRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetEntry": { - "requestType": "GetEntryRequest", - "responseType": "Entry", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "LookupEntry": { - "requestType": "LookupEntryRequest", - "responseType": "Entry", - "options": { - "(google.api.http).get": "/v1/entries:lookup" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/entries:lookup" - } - } - ] - }, - "ListEntries": { - "requestType": "ListEntriesRequest", - "responseType": "ListEntriesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "ModifyEntryOverview": { - "requestType": "ModifyEntryOverviewRequest", - "responseType": "EntryOverview", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryOverview", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryOverview", - "body": "*" - } - } - ] - }, - "ModifyEntryContacts": { - "requestType": "ModifyEntryContactsRequest", - "responseType": "Contacts", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryContacts", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryContacts", - "body": "*" - } - } - ] - }, - "CreateTagTemplate": { - "requestType": "CreateTagTemplateRequest", - "responseType": "TagTemplate", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/tagTemplates", - "(google.api.http).body": "tag_template", - "(google.api.method_signature)": "parent,tag_template_id,tag_template" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/tagTemplates", - "body": "tag_template" - } - }, - { - "(google.api.method_signature)": "parent,tag_template_id,tag_template" - } - ] - }, - "GetTagTemplate": { - "requestType": "GetTagTemplateRequest", - "responseType": "TagTemplate", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/tagTemplates/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/tagTemplates/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateTagTemplate": { - "requestType": "UpdateTagTemplateRequest", - "responseType": "TagTemplate", - "options": { - "(google.api.http).patch": "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}", - "(google.api.http).body": "tag_template", - "(google.api.method_signature)": "tag_template,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}", - "body": "tag_template" - } - }, - { - "(google.api.method_signature)": "tag_template" - }, - { - "(google.api.method_signature)": "tag_template,update_mask" - } - ] - }, - "DeleteTagTemplate": { - "requestType": "DeleteTagTemplateRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/tagTemplates/*}", - "(google.api.method_signature)": "name,force" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/tagTemplates/*}" - } - }, - { - "(google.api.method_signature)": "name,force" - } - ] - }, - "CreateTagTemplateField": { - "requestType": "CreateTagTemplateFieldRequest", - "responseType": "TagTemplateField", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields", - "(google.api.http).body": "tag_template_field", - "(google.api.method_signature)": "parent,tag_template_field_id,tag_template_field" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields", - "body": "tag_template_field" - } - }, - { - "(google.api.method_signature)": "parent,tag_template_field_id,tag_template_field" - } - ] - }, - "UpdateTagTemplateField": { - "requestType": "UpdateTagTemplateFieldRequest", - "responseType": "TagTemplateField", - "options": { - "(google.api.http).patch": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}", - "(google.api.http).body": "tag_template_field", - "(google.api.method_signature)": "name,tag_template_field,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}", - "body": "tag_template_field" - } - }, - { - "(google.api.method_signature)": "name,tag_template_field" - }, - { - "(google.api.method_signature)": "name,tag_template_field,update_mask" - } - ] - }, - "RenameTagTemplateField": { - "requestType": "RenameTagTemplateFieldRequest", - "responseType": "TagTemplateField", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,new_tag_template_field_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name,new_tag_template_field_id" - } - ] - }, - "RenameTagTemplateFieldEnumValue": { - "requestType": "RenameTagTemplateFieldEnumValueRequest", - "responseType": "TagTemplateField", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,new_enum_value_display_name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name,new_enum_value_display_name" - } - ] - }, - "DeleteTagTemplateField": { - "requestType": "DeleteTagTemplateFieldRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}", - "(google.api.method_signature)": "name,force" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - } - }, - { - "(google.api.method_signature)": "name,force" - } - ] - }, - "CreateTag": { - "requestType": "CreateTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", - "(google.api.http).body": "tag", - "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags", - "(google.api.http).additional_bindings.body": "tag", - "(google.api.method_signature)": "parent,tag" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", - "body": "tag", - "additional_bindings": { - "post": "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags", - "body": "tag" - } - } - }, - { - "(google.api.method_signature)": "parent,tag" - } - ] - }, - "UpdateTag": { - "requestType": "UpdateTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).patch": "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", - "(google.api.http).body": "tag", - "(google.api.http).additional_bindings.patch": "/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}", - "(google.api.http).additional_bindings.body": "tag", - "(google.api.method_signature)": "tag,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", - "body": "tag", - "additional_bindings": { - "patch": "/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}", - "body": "tag" - } - } - }, - { - "(google.api.method_signature)": "tag" - }, - { - "(google.api.method_signature)": "tag,update_mask" - } - ] - }, - "DeleteTag": { - "requestType": "DeleteTagRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", - "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", - "additional_bindings": { - "delete": "/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListTags": { - "requestType": "ListTagsRequest", - "responseType": "ListTagsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", - "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", - "additional_bindings": { - "get": "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "StarEntry": { - "requestType": "StarEntryRequest", - "responseType": "StarEntryResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:star", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:star", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UnstarEntry": { - "requestType": "UnstarEntryRequest", - "responseType": "UnstarEntryResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:unstar", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:unstar", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "resource,policy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy", - "body": "*", - "additional_bindings": { - "post": "/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "resource,policy" - } - ] - }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "resource" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy", - "body": "*", - "additional_bindings": [ - { - "post": "/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy", - "body": "*" - }, - { - "post": "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy", - "body": "*" - } - ] - } - }, - { - "(google.api.method_signature)": "resource" - } - ] - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions", - "body": "*", - "additional_bindings": [ - { - "post": "/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions", - "body": "*" - }, - { - "post": "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions", - "body": "*" - } - ] - } - } - ] - } - } - }, - "SearchCatalogRequest": { - "fields": { - "scope": { - "type": "Scope", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "query": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Scope": { - "fields": { - "includeOrgIds": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "includeProjectIds": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "includeGcpPublicDatasets": { - "type": "bool", - "id": 7 - }, - "restrictedLocations": { - "rule": "repeated", - "type": "string", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "starredOnly": { - "type": "bool", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "includePublicTagTemplates": { - "type": "bool", - "id": 19, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "SearchCatalogResponse": { - "fields": { - "results": { - "rule": "repeated", - "type": "SearchCatalogResult", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 3 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "CreateEntryGroupRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "entryGroupId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "entryGroup": { - "type": "EntryGroup", - "id": 2 - } - } - }, - "UpdateEntryGroupRequest": { - "fields": { - "entryGroup": { - "type": "EntryGroup", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "GetEntryGroupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteEntryGroupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "force": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEntryGroupsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEntryGroupsResponse": { - "fields": { - "entryGroups": { - "rule": "repeated", - "type": "EntryGroup", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CreateEntryRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "entryId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "entry": { - "type": "Entry", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateEntryRequest": { - "fields": { - "entry": { - "type": "Entry", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteEntryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - } - } - }, - "GetEntryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - } - } - }, - "LookupEntryRequest": { - "oneofs": { - "targetName": { - "oneof": [ - "linkedResource", - "sqlResource", - "fullyQualifiedName" - ] - } - }, - "fields": { - "linkedResource": { - "type": "string", - "id": 1 - }, - "sqlResource": { - "type": "string", - "id": 3 - }, - "fullyQualifiedName": { - "type": "string", - "id": 5 - } - } - }, - "Entry": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/Entry", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" - }, - "oneofs": { - "entryType": { - "oneof": [ - "type", - "userSpecifiedType" - ] - }, - "system": { - "oneof": [ - "integratedSystem", - "userSpecifiedSystem" - ] - }, - "typeSpec": { - "oneof": [ - "gcsFilesetSpec", - "bigqueryTableSpec", - "bigqueryDateShardedSpec" - ] - }, - "spec": { - "oneof": [ - "databaseTableSpec", - "dataSourceConnectionSpec", - "routineSpec", - "filesetSpec" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "linkedResource": { - "type": "string", - "id": 9 - }, - "fullyQualifiedName": { - "type": "string", - "id": 29 - }, - "type": { - "type": "EntryType", - "id": 2 - }, - "userSpecifiedType": { - "type": "string", - "id": 16 - }, - "integratedSystem": { - "type": "IntegratedSystem", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "userSpecifiedSystem": { - "type": "string", - "id": 18 - }, - "gcsFilesetSpec": { - "type": "GcsFilesetSpec", - "id": 6 - }, - "bigqueryTableSpec": { - "type": "BigQueryTableSpec", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "bigqueryDateShardedSpec": { - "type": "BigQueryDateShardedSpec", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "databaseTableSpec": { - "type": "DatabaseTableSpec", - "id": 24 - }, - "dataSourceConnectionSpec": { - "type": "DataSourceConnectionSpec", - "id": 27 - }, - "routineSpec": { - "type": "RoutineSpec", - "id": 28 - }, - "filesetSpec": { - "type": "FilesetSpec", - "id": 33 - }, - "displayName": { - "type": "string", - "id": 3 - }, - "description": { - "type": "string", - "id": 4 - }, - "businessContext": { - "type": "BusinessContext", - "id": 37 - }, - "schema": { - "type": "Schema", - "id": 5 - }, - "sourceSystemTimestamps": { - "type": "SystemTimestamps", - "id": 7 - }, - "usageSignal": { - "type": "UsageSignal", - "id": 13 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 14 - }, - "dataSource": { - "type": "DataSource", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "personalDetails": { - "type": "PersonalDetails", - "id": 26, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "DatabaseTableSpec": { - "fields": { - "type": { - "type": "TableType", - "id": 1 - }, - "dataplexTable": { - "type": "DataplexTableSpec", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "TableType": { - "values": { - "TABLE_TYPE_UNSPECIFIED": 0, - "NATIVE": 1, - "EXTERNAL": 2 - } - } - } - }, - "FilesetSpec": { - "fields": { - "dataplexFileset": { - "type": "DataplexFilesetSpec", - "id": 1 - } - } - }, - "DataSourceConnectionSpec": { - "fields": { - "bigqueryConnectionSpec": { - "type": "BigQueryConnectionSpec", - "id": 1 - } - } - }, - "RoutineSpec": { - "oneofs": { - "systemSpec": { - "oneof": [ - "bigqueryRoutineSpec" - ] - } - }, - "fields": { - "routineType": { - "type": "RoutineType", - "id": 1 - }, - "language": { - "type": "string", - "id": 2 - }, - "routineArguments": { - "rule": "repeated", - "type": "Argument", - "id": 3 - }, - "returnType": { - "type": "string", - "id": 4 - }, - "definitionBody": { - "type": "string", - "id": 5 - }, - "bigqueryRoutineSpec": { - "type": "BigQueryRoutineSpec", - "id": 6 - } - }, - "nested": { - "RoutineType": { - "values": { - "ROUTINE_TYPE_UNSPECIFIED": 0, - "SCALAR_FUNCTION": 1, - "PROCEDURE": 2 - } - }, - "Argument": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "mode": { - "type": "Mode", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - } - }, - "nested": { - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "IN": 1, - "OUT": 2, - "INOUT": 3 - } - } - } - } - } - }, - "BusinessContext": { - "fields": { - "entryOverview": { - "type": "EntryOverview", - "id": 1 - }, - "contacts": { - "type": "Contacts", - "id": 2 - } - } - }, - "EntryOverview": { - "fields": { - "overview": { - "type": "string", - "id": 1 - } - } - }, - "Contacts": { - "fields": { - "people": { - "rule": "repeated", - "type": "Person", - "id": 1 - } - }, - "nested": { - "Person": { - "fields": { - "designation": { - "type": "string", - "id": 1 - }, - "email": { - "type": "string", - "id": 2 - } - } - } - } - }, - "EntryGroup": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/EntryGroup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "dataCatalogTimestamps": { - "type": "SystemTimestamps", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreateTagTemplateRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/TagTemplate" - } - }, - "tagTemplateId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "tagTemplate": { - "type": "TagTemplate", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetTagTemplateRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplate" - } - } - } - }, - "UpdateTagTemplateRequest": { - "fields": { - "tagTemplate": { - "type": "TagTemplate", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteTagTemplateRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplate" - } - }, - "force": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "CreateTagRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Tag" - } - }, - "tag": { - "type": "Tag", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateTagRequest": { - "fields": { - "tag": { - "type": "Tag", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Tag" - } - } - } - }, - "CreateTagTemplateFieldRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplate" - } - }, - "tagTemplateFieldId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "tagTemplateField": { - "type": "TagTemplateField", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateTagTemplateFieldRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplateField" - } - }, - "tagTemplateField": { - "type": "TagTemplateField", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RenameTagTemplateFieldRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplateField" - } - }, - "newTagTemplateFieldId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "RenameTagTemplateFieldEnumValueRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplateFieldEnumValue" - } - }, - "newEnumValueDisplayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteTagTemplateFieldRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplateField" - } - }, - "force": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListTagsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Tag" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListTagsResponse": { - "fields": { - "tags": { - "rule": "repeated", - "type": "Tag", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListEntriesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 4 - } - } - }, - "ListEntriesResponse": { - "fields": { - "entries": { - "rule": "repeated", - "type": "Entry", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "StarEntryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - } - } - }, - "StarEntryResponse": { - "fields": {} - }, - "UnstarEntryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - } - } - }, - "UnstarEntryResponse": { - "fields": {} - }, - "ModifyEntryOverviewRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - }, - "entryOverview": { - "type": "EntryOverview", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ModifyEntryContactsRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - }, - "contacts": { - "type": "Contacts", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "EntryType": { - "values": { - "ENTRY_TYPE_UNSPECIFIED": 0, - "TABLE": 2, - "MODEL": 5, - "DATA_STREAM": 3, - "FILESET": 4, - "CLUSTER": 6, - "DATABASE": 7, - "DATA_SOURCE_CONNECTION": 8, - "ROUTINE": 9, - "LAKE": 10, - "ZONE": 11, - "SERVICE": 14 - } - }, - "DataplexSpec": { - "fields": { - "asset": { - "type": "string", - "id": 1 - }, - "dataFormat": { - "type": "PhysicalSchema", - "id": 2 - }, - "compressionFormat": { - "type": "string", - "id": 3 - }, - "projectId": { - "type": "string", - "id": 4 - } - } - }, - "DataplexFilesetSpec": { - "fields": { - "dataplexSpec": { - "type": "DataplexSpec", - "id": 1 - } - } - }, - "DataplexTableSpec": { - "fields": { - "externalTables": { - "rule": "repeated", - "type": "DataplexExternalTable", - "id": 1 - }, - "dataplexSpec": { - "type": "DataplexSpec", - "id": 2 - }, - "userManaged": { - "type": "bool", - "id": 3 - } - } - }, - "DataplexExternalTable": { - "fields": { - "system": { - "type": "IntegratedSystem", - "id": 1 - }, - "fullyQualifiedName": { - "type": "string", - "id": 28 - }, - "googleCloudResource": { - "type": "string", - "id": 3 - }, - "dataCatalogEntry": { - "type": "string", - "id": 4 - } - } - }, - "PhysicalSchema": { - "oneofs": { - "schema": { - "oneof": [ - "avro", - "thrift", - "protobuf", - "parquet", - "orc", - "csv" - ] - } - }, - "fields": { - "avro": { - "type": "AvroSchema", - "id": 1 - }, - "thrift": { - "type": "ThriftSchema", - "id": 2 - }, - "protobuf": { - "type": "ProtobufSchema", - "id": 3 - }, - "parquet": { - "type": "ParquetSchema", - "id": 4 - }, - "orc": { - "type": "OrcSchema", - "id": 5 - }, - "csv": { - "type": "CsvSchema", - "id": 6 - } - }, - "nested": { - "AvroSchema": { - "fields": { - "text": { - "type": "string", - "id": 1 - } - } - }, - "ThriftSchema": { - "fields": { - "text": { - "type": "string", - "id": 1 - } - } - }, - "ProtobufSchema": { - "fields": { - "text": { - "type": "string", - "id": 1 - } - } - }, - "ParquetSchema": { - "fields": {} - }, - "OrcSchema": { - "fields": {} - }, - "CsvSchema": { - "fields": {} - } - } - }, - "GcsFilesetSpec": { - "fields": { - "filePatterns": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sampleGcsFileSpecs": { - "rule": "repeated", - "type": "GcsFileSpec", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "GcsFileSpec": { - "fields": { - "filePath": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "gcsTimestamps": { - "type": "SystemTimestamps", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "sizeBytes": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "SystemTimestamps": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Schema": { - "fields": { - "columns": { - "rule": "repeated", - "type": "ColumnSchema", - "id": 2 - } - } - }, - "ColumnSchema": { - "fields": { - "column": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "mode": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "subcolumns": { - "rule": "repeated", - "type": "ColumnSchema", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SearchCatalogResult": { - "oneofs": { - "system": { - "oneof": [ - "integratedSystem", - "userSpecifiedSystem" - ] - } - }, - "fields": { - "searchResultType": { - "type": "SearchResultType", - "id": 1 - }, - "searchResultSubtype": { - "type": "string", - "id": 2 - }, - "relativeResourceName": { - "type": "string", - "id": 3 - }, - "linkedResource": { - "type": "string", - "id": 4 - }, - "modifyTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "integratedSystem": { - "type": "IntegratedSystem", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "userSpecifiedSystem": { - "type": "string", - "id": 9 - }, - "fullyQualifiedName": { - "type": "string", - "id": 10 - }, - "displayName": { - "type": "string", - "id": 12 - }, - "description": { - "type": "string", - "id": 13 - } - } - }, - "SearchResultType": { - "values": { - "SEARCH_RESULT_TYPE_UNSPECIFIED": 0, - "ENTRY": 1, - "TAG_TEMPLATE": 2, - "ENTRY_GROUP": 3 - } - }, - "BigQueryTableSpec": { - "oneofs": { - "typeSpec": { - "oneof": [ - "viewSpec", - "tableSpec" - ] - } - }, - "fields": { - "tableSourceType": { - "type": "TableSourceType", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "viewSpec": { - "type": "ViewSpec", - "id": 2 - }, - "tableSpec": { - "type": "TableSpec", - "id": 3 - } - } - }, - "TableSourceType": { - "values": { - "TABLE_SOURCE_TYPE_UNSPECIFIED": 0, - "BIGQUERY_VIEW": 2, - "BIGQUERY_TABLE": 5, - "BIGQUERY_MATERIALIZED_VIEW": 7 - } - }, - "ViewSpec": { - "fields": { - "viewQuery": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "TableSpec": { - "fields": { - "groupedEntry": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - } - } - }, - "BigQueryDateShardedSpec": { - "fields": { - "dataset": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - }, - "tablePrefix": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "shardCount": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "latestShardResource": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Tag": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/Tag", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" - }, - "oneofs": { - "scope": { - "oneof": [ - "column" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "template": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "templateDisplayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "column": { - "type": "string", - "id": 4 - }, - "fields": { - "keyType": "string", - "type": "TagField", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TagField": { - "oneofs": { - "kind": { - "oneof": [ - "doubleValue", - "stringValue", - "boolValue", - "timestampValue", - "enumValue", - "richtextValue" - ] - } - }, - "fields": { - "displayName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "doubleValue": { - "type": "double", - "id": 2 - }, - "stringValue": { - "type": "string", - "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "timestampValue": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "enumValue": { - "type": "EnumValue", - "id": 6 - }, - "richtextValue": { - "type": "string", - "id": 8 - }, - "order": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "EnumValue": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - } - } - } - } - }, - "TagTemplate": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/TagTemplate", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/tagTemplates/{tag_template}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "isPubliclyReadable": { - "type": "bool", - "id": 5 - }, - "fields": { - "keyType": "string", - "type": "TagTemplateField", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TagTemplateField": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/TagTemplateField", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" - }, - "fields": { - "name": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 1 - }, - "type": { - "type": "FieldType", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "isRequired": { - "type": "bool", - "id": 3 - }, - "description": { - "type": "string", - "id": 4 - }, - "order": { - "type": "int32", - "id": 5 - } - } - }, - "FieldType": { - "oneofs": { - "typeDecl": { - "oneof": [ - "primitiveType", - "enumType" - ] - } - }, - "fields": { - "primitiveType": { - "type": "PrimitiveType", - "id": 1 - }, - "enumType": { - "type": "EnumType", - "id": 2 - } - }, - "nested": { - "PrimitiveType": { - "values": { - "PRIMITIVE_TYPE_UNSPECIFIED": 0, - "DOUBLE": 1, - "STRING": 2, - "BOOL": 3, - "TIMESTAMP": 4, - "RICHTEXT": 5 - } - }, - "EnumType": { - "fields": { - "allowedValues": { - "rule": "repeated", - "type": "EnumValue", - "id": 1 - } - }, - "nested": { - "EnumValue": { - "fields": { - "displayName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - } - } - }, - "UsageStats": { - "fields": { - "totalCompletions": { - "type": "float", - "id": 1 - }, - "totalFailures": { - "type": "float", - "id": 2 - }, - "totalCancellations": { - "type": "float", - "id": 3 - }, - "totalExecutionTimeForCompletionsMillis": { - "type": "float", - "id": 4 - } - } - }, - "UsageSignal": { - "fields": { - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "usageWithinTimeRange": { - "keyType": "string", - "type": "UsageStats", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "PolicyTagManager": { - "options": { - "(google.api.default_host)": "datacatalog.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateTaxonomy": { - "requestType": "CreateTaxonomyRequest", - "responseType": "Taxonomy", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/taxonomies", - "(google.api.http).body": "taxonomy", - "(google.api.method_signature)": "parent,taxonomy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/taxonomies", - "body": "taxonomy" - } - }, - { - "(google.api.method_signature)": "parent,taxonomy" - } - ] - }, - "DeleteTaxonomy": { - "requestType": "DeleteTaxonomyRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/taxonomies/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/taxonomies/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateTaxonomy": { - "requestType": "UpdateTaxonomyRequest", - "responseType": "Taxonomy", - "options": { - "(google.api.http).patch": "/v1/{taxonomy.name=projects/*/locations/*/taxonomies/*}", - "(google.api.http).body": "taxonomy", - "(google.api.method_signature)": "taxonomy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{taxonomy.name=projects/*/locations/*/taxonomies/*}", - "body": "taxonomy" - } - }, - { - "(google.api.method_signature)": "taxonomy" - } - ] - }, - "ListTaxonomies": { - "requestType": "ListTaxonomiesRequest", - "responseType": "ListTaxonomiesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/taxonomies", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/taxonomies" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetTaxonomy": { - "requestType": "GetTaxonomyRequest", - "responseType": "Taxonomy", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/taxonomies/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/taxonomies/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreatePolicyTag": { - "requestType": "CreatePolicyTagRequest", - "responseType": "PolicyTag", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags", - "(google.api.http).body": "policy_tag", - "(google.api.method_signature)": "parent,policy_tag" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags", - "body": "policy_tag" - } - }, - { - "(google.api.method_signature)": "parent,policy_tag" - } - ] - }, - "DeletePolicyTag": { - "requestType": "DeletePolicyTagRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdatePolicyTag": { - "requestType": "UpdatePolicyTagRequest", - "responseType": "PolicyTag", - "options": { - "(google.api.http).patch": "/v1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}", - "(google.api.http).body": "policy_tag", - "(google.api.method_signature)": "policy_tag" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}", - "body": "policy_tag" - } - }, - { - "(google.api.method_signature)": "policy_tag" - } - ] - }, - "ListPolicyTags": { - "requestType": "ListPolicyTagsRequest", - "responseType": "ListPolicyTagsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetPolicyTag": { - "requestType": "GetPolicyTagRequest", - "responseType": "PolicyTag", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy", - "body": "*", - "additional_bindings": { - "post": "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy", - "body": "*" - } - } - } - ] - }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy", - "body": "*", - "additional_bindings": { - "post": "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy", - "body": "*" - } - } - } - ] - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions", - "body": "*", - "additional_bindings": { - "post": "/v1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions", - "body": "*" - } - } - } - ] - } - } - }, - "Taxonomy": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/Taxonomy", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/taxonomies/{taxonomy}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "policyTagCount": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "taxonomyTimestamps": { - "type": "SystemTimestamps", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "activatedPolicyTypes": { - "rule": "repeated", - "type": "PolicyType", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "PolicyType": { - "values": { - "POLICY_TYPE_UNSPECIFIED": 0, - "FINE_GRAINED_ACCESS_CONTROL": 1 - } - } - } - }, - "PolicyTag": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/PolicyTag", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 3 - }, - "parentPolicyTag": { - "type": "string", - "id": 4 - }, - "childPolicyTags": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreateTaxonomyRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "taxonomy": { - "type": "Taxonomy", - "id": 2 - } - } - }, - "DeleteTaxonomyRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" - } - } - } - }, - "UpdateTaxonomyRequest": { - "fields": { - "taxonomy": { - "type": "Taxonomy", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "ListTaxonomiesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListTaxonomiesResponse": { - "fields": { - "taxonomies": { - "rule": "repeated", - "type": "Taxonomy", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetTaxonomyRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" - } - } - } - }, - "CreatePolicyTagRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/PolicyTag" - } - }, - "policyTag": { - "type": "PolicyTag", - "id": 2 - } - } - }, - "DeletePolicyTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/PolicyTag" - } - } - } - }, - "UpdatePolicyTagRequest": { - "fields": { - "policyTag": { - "type": "PolicyTag", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "ListPolicyTagsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/PolicyTag" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListPolicyTagsResponse": { - "fields": { - "policyTags": { - "rule": "repeated", - "type": "PolicyTag", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetPolicyTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/PolicyTag" - } - } - } - }, - "PolicyTagManagerSerialization": { - "options": { - "(google.api.default_host)": "datacatalog.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ReplaceTaxonomy": { - "requestType": "ReplaceTaxonomyRequest", - "responseType": "Taxonomy", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/taxonomies/*}:replace", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/taxonomies/*}:replace", - "body": "*" - } - } - ] - }, - "ImportTaxonomies": { - "requestType": "ImportTaxonomiesRequest", - "responseType": "ImportTaxonomiesResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/taxonomies:import", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/taxonomies:import", - "body": "*" - } - } - ] - }, - "ExportTaxonomies": { - "requestType": "ExportTaxonomiesRequest", - "responseType": "ExportTaxonomiesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/taxonomies:export" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/taxonomies:export" - } - } - ] - } - } - }, - "SerializedTaxonomy": { - "fields": { - "displayName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 2 - }, - "policyTags": { - "rule": "repeated", - "type": "SerializedPolicyTag", - "id": 3 - }, - "activatedPolicyTypes": { - "rule": "repeated", - "type": "Taxonomy.PolicyType", - "id": 4 - } - } - }, - "SerializedPolicyTag": { - "fields": { - "policyTag": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 3 - }, - "childPolicyTags": { - "rule": "repeated", - "type": "SerializedPolicyTag", - "id": 4 - } - } - }, - "ReplaceTaxonomyRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "serializedTaxonomy": { - "type": "SerializedTaxonomy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ImportTaxonomiesRequest": { - "oneofs": { - "source": { - "oneof": [ - "inlineSource", - "crossRegionalSource" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "inlineSource": { - "type": "InlineSource", - "id": 2 - }, - "crossRegionalSource": { - "type": "CrossRegionalSource", - "id": 3 - } - } - }, - "InlineSource": { - "fields": { - "taxonomies": { - "rule": "repeated", - "type": "SerializedTaxonomy", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "CrossRegionalSource": { - "fields": { - "taxonomy": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" - } - } - } - }, - "ImportTaxonomiesResponse": { - "fields": { - "taxonomies": { - "rule": "repeated", - "type": "Taxonomy", - "id": 1 - } - } - }, - "ExportTaxonomiesRequest": { - "oneofs": { - "destination": { - "oneof": [ - "serializedTaxonomies" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "taxonomies": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "serializedTaxonomies": { - "type": "bool", - "id": 3 - } - } - }, - "ExportTaxonomiesResponse": { - "fields": { - "taxonomies": { - "rule": "repeated", - "type": "SerializedTaxonomy", - "id": 1 - } - } - } - } - }, - "v1beta1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.DataCatalog.V1Beta1", - "go_package": "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog", - "java_multiple_files": true, - "java_package": "com.google.cloud.datacatalog.v1beta1", - "php_namespace": "Google\\Cloud\\DataCatalog\\V1beta1", - "ruby_package": "Google::Cloud::DataCatalog::V1beta1", - "java_outer_classname": "PolicyTagManagerSerializationProto" - }, - "nested": { - "IntegratedSystem": { - "values": { - "INTEGRATED_SYSTEM_UNSPECIFIED": 0, - "BIGQUERY": 1, - "CLOUD_PUBSUB": 2 - } - }, - "DataCatalog": { - "options": { - "(google.api.default_host)": "datacatalog.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "SearchCatalog": { - "requestType": "SearchCatalogRequest", - "responseType": "SearchCatalogResponse", - "options": { - "(google.api.http).post": "/v1beta1/catalog:search", - "(google.api.http).body": "*", - "(google.api.method_signature)": "scope,query" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/catalog:search", - "body": "*" - } - }, - { - "(google.api.method_signature)": "scope,query" - } - ] - }, - "CreateEntryGroup": { - "requestType": "CreateEntryGroupRequest", - "responseType": "EntryGroup", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/entryGroups", - "(google.api.http).body": "entry_group", - "(google.api.method_signature)": "parent,entry_group_id,entry_group" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/entryGroups", - "body": "entry_group" - } - }, - { - "(google.api.method_signature)": "parent,entry_group_id,entry_group" - } - ] - }, - "UpdateEntryGroup": { - "requestType": "UpdateEntryGroupRequest", - "responseType": "EntryGroup", - "options": { - "(google.api.http).patch": "/v1beta1/{entry_group.name=projects/*/locations/*/entryGroups/*}", - "(google.api.http).body": "entry_group", - "(google.api.method_signature)": "entry_group,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{entry_group.name=projects/*/locations/*/entryGroups/*}", - "body": "entry_group" - } - }, - { - "(google.api.method_signature)": "entry_group" - }, - { - "(google.api.method_signature)": "entry_group,update_mask" - } - ] - }, - "GetEntryGroup": { - "requestType": "GetEntryGroupRequest", - "responseType": "EntryGroup", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/entryGroups/*}", - "(google.api.method_signature)": "name,read_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/entryGroups/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.api.method_signature)": "name,read_mask" - } - ] - }, - "DeleteEntryGroup": { - "requestType": "DeleteEntryGroupRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/entryGroups/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/entryGroups/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListEntryGroups": { - "requestType": "ListEntryGroupsRequest", - "responseType": "ListEntryGroupsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/entryGroups", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/entryGroups" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateEntry": { - "requestType": "CreateEntryRequest", - "responseType": "Entry", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries", - "(google.api.http).body": "entry", - "(google.api.method_signature)": "parent,entry_id,entry" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries", - "body": "entry" - } - }, - { - "(google.api.method_signature)": "parent,entry_id,entry" - } - ] - }, - "UpdateEntry": { - "requestType": "UpdateEntryRequest", - "responseType": "Entry", - "options": { - "(google.api.http).patch": "/v1beta1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}", - "(google.api.http).body": "entry", - "(google.api.method_signature)": "entry,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}", - "body": "entry" - } - }, - { - "(google.api.method_signature)": "entry" - }, - { - "(google.api.method_signature)": "entry,update_mask" - } - ] - }, - "DeleteEntry": { - "requestType": "DeleteEntryRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetEntry": { - "requestType": "GetEntryRequest", - "responseType": "Entry", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "LookupEntry": { - "requestType": "LookupEntryRequest", - "responseType": "Entry", - "options": { - "(google.api.http).get": "/v1beta1/entries:lookup" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/entries:lookup" - } - } - ] - }, - "ListEntries": { - "requestType": "ListEntriesRequest", - "responseType": "ListEntriesResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateTagTemplate": { - "requestType": "CreateTagTemplateRequest", - "responseType": "TagTemplate", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/tagTemplates", - "(google.api.http).body": "tag_template", - "(google.api.method_signature)": "parent,tag_template_id,tag_template" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/tagTemplates", - "body": "tag_template" - } - }, - { - "(google.api.method_signature)": "parent,tag_template_id,tag_template" - } - ] - }, - "GetTagTemplate": { - "requestType": "GetTagTemplateRequest", - "responseType": "TagTemplate", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateTagTemplate": { - "requestType": "UpdateTagTemplateRequest", - "responseType": "TagTemplate", - "options": { - "(google.api.http).patch": "/v1beta1/{tag_template.name=projects/*/locations/*/tagTemplates/*}", - "(google.api.http).body": "tag_template", - "(google.api.method_signature)": "tag_template,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{tag_template.name=projects/*/locations/*/tagTemplates/*}", - "body": "tag_template" - } - }, - { - "(google.api.method_signature)": "tag_template" - }, - { - "(google.api.method_signature)": "tag_template,update_mask" - } - ] - }, - "DeleteTagTemplate": { - "requestType": "DeleteTagTemplateRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}", - "(google.api.method_signature)": "name,force" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" - } - }, - { - "(google.api.method_signature)": "name,force" - } - ] - }, - "CreateTagTemplateField": { - "requestType": "CreateTagTemplateFieldRequest", - "responseType": "TagTemplateField", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/tagTemplates/*}/fields", - "(google.api.http).body": "tag_template_field", - "(google.api.method_signature)": "parent,tag_template_field_id,tag_template_field" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*/tagTemplates/*}/fields", - "body": "tag_template_field" - } - }, - { - "(google.api.method_signature)": "parent,tag_template_field_id,tag_template_field" - } - ] - }, - "UpdateTagTemplateField": { - "requestType": "UpdateTagTemplateFieldRequest", - "responseType": "TagTemplateField", - "options": { - "(google.api.http).patch": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}", - "(google.api.http).body": "tag_template_field", - "(google.api.method_signature)": "name,tag_template_field,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}", - "body": "tag_template_field" - } - }, - { - "(google.api.method_signature)": "name,tag_template_field" - }, - { - "(google.api.method_signature)": "name,tag_template_field,update_mask" - } - ] - }, - "RenameTagTemplateField": { - "requestType": "RenameTagTemplateFieldRequest", - "responseType": "TagTemplateField", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,new_tag_template_field_id" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name,new_tag_template_field_id" - } - ] - }, - "DeleteTagTemplateField": { - "requestType": "DeleteTagTemplateFieldRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}", - "(google.api.method_signature)": "name,force" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - } - }, - { - "(google.api.method_signature)": "name,force" - } - ] - }, - "CreateTag": { - "requestType": "CreateTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", - "(google.api.http).body": "tag", - "(google.api.http).additional_bindings.post": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags", - "(google.api.http).additional_bindings.body": "tag", - "(google.api.method_signature)": "parent,tag" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", - "body": "tag", - "additional_bindings": { - "post": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags", - "body": "tag" - } - } - }, - { - "(google.api.method_signature)": "parent,tag" - } - ] - }, - "UpdateTag": { - "requestType": "UpdateTagRequest", - "responseType": "Tag", - "options": { - "(google.api.http).patch": "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", - "(google.api.http).body": "tag", - "(google.api.http).additional_bindings.patch": "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}", - "(google.api.http).additional_bindings.body": "tag", - "(google.api.method_signature)": "tag,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", - "body": "tag", - "additional_bindings": { - "patch": "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}", - "body": "tag" - } - } - }, - { - "(google.api.method_signature)": "tag" - }, - { - "(google.api.method_signature)": "tag,update_mask" - } - ] - }, - "DeleteTag": { - "requestType": "DeleteTagRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", - "(google.api.http).additional_bindings.delete": "/v1beta1/{name=projects/*/locations/*/entryGroups/*/tags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}", - "additional_bindings": { - "delete": "/v1beta1/{name=projects/*/locations/*/entryGroups/*/tags/*}" - } - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListTags": { - "requestType": "ListTagsRequest", - "responseType": "ListTagsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", - "(google.api.http).additional_bindings.get": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags", - "additional_bindings": { - "get": "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags" - } - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "resource,policy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy", - "body": "*" - } - } - }, - { - "(google.api.method_signature)": "resource,policy" - } - ] - }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "resource" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy", - "body": "*", - "additional_bindings": [ - { - "post": "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy", - "body": "*" - }, - { - "post": "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy", - "body": "*" - } - ] - } - }, - { - "(google.api.method_signature)": "resource" - } - ] - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions", - "body": "*", - "additional_bindings": [ - { - "post": "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions", - "body": "*" - }, - { - "post": "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions", - "body": "*" - } - ] - } - } - ] - } - } - }, - "SearchCatalogRequest": { - "fields": { - "scope": { - "type": "Scope", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "query": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Scope": { - "fields": { - "includeOrgIds": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "includeProjectIds": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "includeGcpPublicDatasets": { - "type": "bool", - "id": 7 - } - } - } - } - }, - "SearchCatalogResponse": { - "fields": { - "results": { - "rule": "repeated", - "type": "SearchCatalogResult", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 3 - } - } - }, - "CreateEntryGroupRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "entryGroupId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "entryGroup": { - "type": "EntryGroup", - "id": 2 - } - } - }, - "UpdateEntryGroupRequest": { - "fields": { - "entryGroup": { - "type": "EntryGroup", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "GetEntryGroupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteEntryGroupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "force": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEntryGroupsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEntryGroupsResponse": { - "fields": { - "entryGroups": { - "rule": "repeated", - "type": "EntryGroup", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CreateEntryRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "entryId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "entry": { - "type": "Entry", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateEntryRequest": { - "fields": { - "entry": { - "type": "Entry", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteEntryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - } - } - }, - "GetEntryRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - } - } - }, - "LookupEntryRequest": { - "oneofs": { - "targetName": { - "oneof": [ - "linkedResource", - "sqlResource" - ] - } - }, - "fields": { - "linkedResource": { - "type": "string", - "id": 1 - }, - "sqlResource": { - "type": "string", - "id": 3 - } - } - }, - "Entry": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/Entry", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" - }, - "oneofs": { - "entryType": { - "oneof": [ - "type", - "userSpecifiedType" - ] - }, - "system": { - "oneof": [ - "integratedSystem", - "userSpecifiedSystem" - ] - }, - "typeSpec": { - "oneof": [ - "gcsFilesetSpec", - "bigqueryTableSpec", - "bigqueryDateShardedSpec" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "linkedResource": { - "type": "string", - "id": 9 - }, - "type": { - "type": "EntryType", - "id": 2 - }, - "userSpecifiedType": { - "type": "string", - "id": 16 - }, - "integratedSystem": { - "type": "IntegratedSystem", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "userSpecifiedSystem": { - "type": "string", - "id": 18 - }, - "gcsFilesetSpec": { - "type": "GcsFilesetSpec", - "id": 6 - }, - "bigqueryTableSpec": { - "type": "BigQueryTableSpec", - "id": 12 - }, - "bigqueryDateShardedSpec": { - "type": "BigQueryDateShardedSpec", - "id": 15 - }, - "displayName": { - "type": "string", - "id": 3 - }, - "description": { - "type": "string", - "id": 4 - }, - "schema": { - "type": "Schema", - "id": 5 - }, - "sourceSystemTimestamps": { - "type": "SystemTimestamps", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "EntryGroup": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/EntryGroup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "dataCatalogTimestamps": { - "type": "SystemTimestamps", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreateTagTemplateRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/TagTemplate" - } - }, - "tagTemplateId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "tagTemplate": { - "type": "TagTemplate", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetTagTemplateRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplate" - } - } - } - }, - "UpdateTagTemplateRequest": { - "fields": { - "tagTemplate": { - "type": "TagTemplate", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteTagTemplateRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplate" - } - }, - "force": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "CreateTagRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Tag" - } - }, - "tag": { - "type": "Tag", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateTagRequest": { - "fields": { - "tag": { - "type": "Tag", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Tag" - } - } - } - }, - "CreateTagTemplateFieldRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplate" - } - }, - "tagTemplateFieldId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "tagTemplateField": { - "type": "TagTemplateField", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateTagTemplateFieldRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplateField" - } - }, - "tagTemplateField": { - "type": "TagTemplateField", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RenameTagTemplateFieldRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplateField" - } - }, - "newTagTemplateFieldId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteTagTemplateFieldRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/TagTemplateField" - } - }, - "force": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListTagsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Tag" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListTagsResponse": { - "fields": { - "tags": { - "rule": "repeated", - "type": "Tag", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListEntriesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/EntryGroup" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 4 - } - } - }, - "ListEntriesResponse": { - "fields": { - "entries": { - "rule": "repeated", - "type": "Entry", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "EntryType": { - "values": { - "ENTRY_TYPE_UNSPECIFIED": 0, - "TABLE": 2, - "MODEL": 5, - "DATA_STREAM": 3, - "FILESET": 4 - } - }, - "GcsFilesetSpec": { - "fields": { - "filePatterns": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "sampleGcsFileSpecs": { - "rule": "repeated", - "type": "GcsFileSpec", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "GcsFileSpec": { - "fields": { - "filePath": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "gcsTimestamps": { - "type": "SystemTimestamps", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "sizeBytes": { - "type": "int64", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "SystemTimestamps": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Schema": { - "fields": { - "columns": { - "rule": "repeated", - "type": "ColumnSchema", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ColumnSchema": { - "fields": { - "column": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "mode": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "subcolumns": { - "rule": "repeated", - "type": "ColumnSchema", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SearchCatalogResult": { - "fields": { - "searchResultType": { - "type": "SearchResultType", - "id": 1 - }, - "searchResultSubtype": { - "type": "string", - "id": 2 - }, - "relativeResourceName": { - "type": "string", - "id": 3 - }, - "linkedResource": { - "type": "string", - "id": 4 - } - } - }, - "SearchResultType": { - "values": { - "SEARCH_RESULT_TYPE_UNSPECIFIED": 0, - "ENTRY": 1, - "TAG_TEMPLATE": 2, - "ENTRY_GROUP": 3 - } - }, - "BigQueryTableSpec": { - "oneofs": { - "typeSpec": { - "oneof": [ - "viewSpec", - "tableSpec" - ] - } - }, - "fields": { - "tableSourceType": { - "type": "TableSourceType", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "viewSpec": { - "type": "ViewSpec", - "id": 2 - }, - "tableSpec": { - "type": "TableSpec", - "id": 3 - } - } - }, - "TableSourceType": { - "values": { - "TABLE_SOURCE_TYPE_UNSPECIFIED": 0, - "BIGQUERY_VIEW": 2, - "BIGQUERY_TABLE": 5 - } - }, - "ViewSpec": { - "fields": { - "viewQuery": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "TableSpec": { - "fields": { - "groupedEntry": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - } - } - }, - "BigQueryDateShardedSpec": { - "fields": { - "dataset": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Entry" - } - }, - "tablePrefix": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "shardCount": { - "type": "int64", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Tag": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/Tag", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" - }, - "oneofs": { - "scope": { - "oneof": [ - "column" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "template": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "templateDisplayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "column": { - "type": "string", - "id": 4 - }, - "fields": { - "keyType": "string", - "type": "TagField", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TagField": { - "oneofs": { - "kind": { - "oneof": [ - "doubleValue", - "stringValue", - "boolValue", - "timestampValue", - "enumValue" - ] - } - }, - "fields": { - "displayName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "doubleValue": { - "type": "double", - "id": 2 - }, - "stringValue": { - "type": "string", - "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "timestampValue": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "enumValue": { - "type": "EnumValue", - "id": 6 - }, - "order": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "EnumValue": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - } - } - } - } - }, - "TagTemplate": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/TagTemplate", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/tagTemplates/{tag_template}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - }, - "fields": { - "keyType": "string", - "type": "TagTemplateField", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TagTemplateField": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/TagTemplateField", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" - }, - "fields": { - "name": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 1 - }, - "type": { - "type": "FieldType", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "isRequired": { - "type": "bool", - "id": 3 - }, - "order": { - "type": "int32", - "id": 5 - } - } - }, - "FieldType": { - "oneofs": { - "typeDecl": { - "oneof": [ - "primitiveType", - "enumType" - ] - } - }, - "fields": { - "primitiveType": { - "type": "PrimitiveType", - "id": 1 - }, - "enumType": { - "type": "EnumType", - "id": 2 - } - }, - "nested": { - "EnumType": { - "fields": { - "allowedValues": { - "rule": "repeated", - "type": "EnumValue", - "id": 1 - } - }, - "nested": { - "EnumValue": { - "fields": { - "displayName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - } - } - }, - "PrimitiveType": { - "values": { - "PRIMITIVE_TYPE_UNSPECIFIED": 0, - "DOUBLE": 1, - "STRING": 2, - "BOOL": 3, - "TIMESTAMP": 4 - } - } - } - }, - "PolicyTagManager": { - "options": { - "(google.api.default_host)": "datacatalog.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateTaxonomy": { - "requestType": "CreateTaxonomyRequest", - "responseType": "Taxonomy", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/taxonomies", - "(google.api.http).body": "taxonomy", - "(google.api.method_signature)": "parent,taxonomy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/taxonomies", - "body": "taxonomy" - } - }, - { - "(google.api.method_signature)": "parent,taxonomy" - } - ] - }, - "DeleteTaxonomy": { - "requestType": "DeleteTaxonomyRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/taxonomies/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateTaxonomy": { - "requestType": "UpdateTaxonomyRequest", - "responseType": "Taxonomy", - "options": { - "(google.api.http).patch": "/v1beta1/{taxonomy.name=projects/*/locations/*/taxonomies/*}", - "(google.api.http).body": "taxonomy", - "(google.api.method_signature)": "taxonomy" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{taxonomy.name=projects/*/locations/*/taxonomies/*}", - "body": "taxonomy" - } - }, - { - "(google.api.method_signature)": "taxonomy" - } - ] - }, - "ListTaxonomies": { - "requestType": "ListTaxonomiesRequest", - "responseType": "ListTaxonomiesResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/taxonomies", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/taxonomies" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetTaxonomy": { - "requestType": "GetTaxonomyRequest", - "responseType": "Taxonomy", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/taxonomies/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreatePolicyTag": { - "requestType": "CreatePolicyTagRequest", - "responseType": "PolicyTag", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags", - "(google.api.http).body": "policy_tag", - "(google.api.method_signature)": "parent,policy_tag" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags", - "body": "policy_tag" - } - }, - { - "(google.api.method_signature)": "parent,policy_tag" - } - ] - }, - "DeletePolicyTag": { - "requestType": "DeletePolicyTagRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdatePolicyTag": { - "requestType": "UpdatePolicyTagRequest", - "responseType": "PolicyTag", - "options": { - "(google.api.http).patch": "/v1beta1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}", - "(google.api.http).body": "policy_tag", - "(google.api.method_signature)": "policy_tag" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}", - "body": "policy_tag" - } - }, - { - "(google.api.method_signature)": "policy_tag" - } - ] - }, - "ListPolicyTags": { - "requestType": "ListPolicyTagsRequest", - "responseType": "ListPolicyTagsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetPolicyTag": { - "requestType": "GetPolicyTagRequest", - "responseType": "PolicyTag", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy", - "body": "*" - } - } - } - ] - }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy", - "body": "*" - } - } - } - ] - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions", - "body": "*", - "additional_bindings": { - "post": "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions", - "body": "*" - } - } - } - ] - } - } - }, - "Taxonomy": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/Taxonomy", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/taxonomies/{taxonomy}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "activatedPolicyTypes": { - "rule": "repeated", - "type": "PolicyType", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "PolicyType": { - "values": { - "POLICY_TYPE_UNSPECIFIED": 0, - "FINE_GRAINED_ACCESS_CONTROL": 1 - } - } - } - }, - "PolicyTag": { - "options": { - "(google.api.resource).type": "datacatalog.googleapis.com/PolicyTag", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 3 - }, - "parentPolicyTag": { - "type": "string", - "id": 4 - }, - "childPolicyTags": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreateTaxonomyRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "taxonomy": { - "type": "Taxonomy", - "id": 2 - } - } - }, - "DeleteTaxonomyRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" - } - } - } - }, - "UpdateTaxonomyRequest": { - "fields": { - "taxonomy": { - "type": "Taxonomy", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "ListTaxonomiesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListTaxonomiesResponse": { - "fields": { - "taxonomies": { - "rule": "repeated", - "type": "Taxonomy", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetTaxonomyRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" - } - } - } - }, - "CreatePolicyTagRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/PolicyTag" - } - }, - "policyTag": { - "type": "PolicyTag", - "id": 2 - } - } - }, - "DeletePolicyTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/PolicyTag" - } - } - } - }, - "UpdatePolicyTagRequest": { - "fields": { - "policyTag": { - "type": "PolicyTag", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "ListPolicyTagsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/PolicyTag" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListPolicyTagsResponse": { - "fields": { - "policyTags": { - "rule": "repeated", - "type": "PolicyTag", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetPolicyTagRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/PolicyTag" - } - } - } - }, - "PolicyTagManagerSerialization": { - "options": { - "(google.api.default_host)": "datacatalog.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ImportTaxonomies": { - "requestType": "ImportTaxonomiesRequest", - "responseType": "ImportTaxonomiesResponse", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/taxonomies:import", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/taxonomies:import", - "body": "*" - } - } - ] - }, - "ExportTaxonomies": { - "requestType": "ExportTaxonomiesRequest", - "responseType": "ExportTaxonomiesResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/taxonomies:export" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/taxonomies:export" - } - } - ] - } - } - }, - "SerializedTaxonomy": { - "fields": { - "displayName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 2 - }, - "policyTags": { - "rule": "repeated", - "type": "SerializedPolicyTag", - "id": 3 - } - } - }, - "SerializedPolicyTag": { - "fields": { - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 3 - }, - "childPolicyTags": { - "rule": "repeated", - "type": "SerializedPolicyTag", - "id": 4 - } - } - }, - "ImportTaxonomiesRequest": { - "oneofs": { - "source": { - "oneof": [ - "inlineSource" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "inlineSource": { - "type": "InlineSource", - "id": 2 - } - } - }, - "InlineSource": { - "fields": { - "taxonomies": { - "rule": "repeated", - "type": "SerializedTaxonomy", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ImportTaxonomiesResponse": { - "fields": { - "taxonomies": { - "rule": "repeated", - "type": "Taxonomy", - "id": 1 - } - } - }, - "ExportTaxonomiesRequest": { - "oneofs": { - "destination": { - "oneof": [ - "serializedTaxonomies" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "taxonomies": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datacatalog.googleapis.com/Taxonomy" - } - }, - "serializedTaxonomies": { - "type": "bool", - "id": 3 - } - } - }, - "ExportTaxonomiesResponse": { - "fields": { - "taxonomies": { - "rule": "repeated", - "type": "SerializedTaxonomy", - "id": 1 - } - } - } - } - } - } - } - } - }, - "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": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7 - } - }, - "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" - }, - "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 - } - } - }, - "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": "string", - "id": 13 - } - } - }, - "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 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "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_REQUIRED": 2, - "LABEL_REPEATED": 3 - } - } - } - }, - "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 - } - }, - "phpGenericServices": { - "type": "bool", - "id": 42, - "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 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 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 - }, - "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 - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - } - } - }, - "OneofOptions": { - "fields": { - "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 - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "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" - } - }, - "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 - } - } - } - } - }, - "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 - } - } - } - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Empty": { - "fields": {} - } - } - }, - "iam": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Iam.V1", - "go_package": "google.golang.org/genproto/googleapis/iam/v1;iam", - "java_multiple_files": true, - "java_outer_classname": "PolicyProto", - "java_package": "com.google.iam.v1", - "php_namespace": "Google\\Cloud\\Iam\\V1" - }, - "nested": { - "IAMPolicy": { - "options": { - "(google.api.default_host)": "iam-meta-api.googleapis.com" - }, - "methods": { - "SetIamPolicy": { - "requestType": "SetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:setIamPolicy", - "body": "*" - } - } - ] - }, - "GetIamPolicy": { - "requestType": "GetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:getIamPolicy", - "body": "*" - } - } - ] - }, - "TestIamPermissions": { - "requestType": "TestIamPermissionsRequest", - "responseType": "TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:testIamPermissions", - "body": "*" - } - } - ] - } - } - }, - "SetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "policy": { - "type": "Policy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3 - } - } - }, - "GetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "options": { - "type": "GetPolicyOptions", - "id": 2 - } - } - }, - "TestIamPermissionsRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "permissions": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TestIamPermissionsResponse": { - "fields": { - "permissions": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "GetPolicyOptions": { - "fields": { - "requestedPolicyVersion": { - "type": "int32", - "id": 1 - } - } - }, - "Policy": { - "fields": { - "version": { - "type": "int32", - "id": 1 - }, - "bindings": { - "rule": "repeated", - "type": "Binding", - "id": 4 - }, - "auditConfigs": { - "rule": "repeated", - "type": "AuditConfig", - "id": 6 - }, - "etag": { - "type": "bytes", - "id": 3 - } - } - }, - "Binding": { - "fields": { - "role": { - "type": "string", - "id": 1 - }, - "members": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "condition": { - "type": "google.type.Expr", - "id": 3 - } - } - }, - "AuditConfig": { - "fields": { - "service": { - "type": "string", - "id": 1 - }, - "auditLogConfigs": { - "rule": "repeated", - "type": "AuditLogConfig", - "id": 3 - } - } - }, - "AuditLogConfig": { - "fields": { - "logType": { - "type": "LogType", - "id": 1 - }, - "exemptedMembers": { - "rule": "repeated", - "type": "string", - "id": 2 - } - }, - "nested": { - "LogType": { - "values": { - "LOG_TYPE_UNSPECIFIED": 0, - "ADMIN_READ": 1, - "DATA_WRITE": 2, - "DATA_READ": 3 - } - } - } - }, - "PolicyDelta": { - "fields": { - "bindingDeltas": { - "rule": "repeated", - "type": "BindingDelta", - "id": 1 - }, - "auditConfigDeltas": { - "rule": "repeated", - "type": "AuditConfigDelta", - "id": 2 - } - } - }, - "BindingDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "role": { - "type": "string", - "id": 2 - }, - "member": { - "type": "string", - "id": 3 - }, - "condition": { - "type": "google.type.Expr", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - }, - "AuditConfigDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "service": { - "type": "string", - "id": 2 - }, - "exemptedMember": { - "type": "string", - "id": 3 - }, - "logType": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - } - } - } - } - }, - "type": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", - "java_multiple_files": true, - "java_outer_classname": "ExprProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "Expr": { - "fields": { - "expression": { - "type": "string", - "id": 1 - }, - "title": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "location": { - "type": "string", - "id": 4 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 26428fcf..00000000 --- a/renovate.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": [ - "config:base", - "docker:disable", - ":disableDependencyDashboard" - ], - "pinVersions": false, - "rebaseStalePrs": true, - "schedule": [ - "after 9am and before 3pm" - ], - "gitAuthor": null, - "packageRules": [ - { - "extends": "packages:linters", - "groupName": "linters" - } - ], - "ignoreDeps": ["typescript"] -} diff --git a/samples/.eslintrc.yml b/samples/.eslintrc.yml deleted file mode 100644 index 674e33fb..00000000 --- a/samples/.eslintrc.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -rules: - no-console: off - node/no-missing-require: off - node/no-extraneous-require: off diff --git a/samples/README.md b/samples/README.md deleted file mode 100644 index 53060326..00000000 --- a/samples/README.md +++ /dev/null @@ -1,122 +0,0 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "To regenerate it, use `python -m synthtool`." -Google Cloud Platform logo - -# [Data Catalog: Node.js Samples](https://github.com/googleapis/nodejs-datacatalog) - -[![Open in Cloud Shell][shell_img]][shell_link] - - - -## Table of Contents - -* [Before you begin](#before-you-begin) -* [Samples](#samples) - * [Create Custom Entry](#create-custom-entry) - * [Create Fileset](#create-fileset) - * [Grant Tag Template User Role](#grant-tag-template-user-role) - * [Quickstart](#quickstart) - * [Search Assets](#search-assets) - -## Before you begin - -Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-datacatalog#using-the-client-library). - -`cd samples` - -`npm install` - -`cd ..` - -## Samples - - - -### Create Custom Entry - -View the [source code](https://github.com/googleapis/nodejs-datacatalog/blob/main/samples/createCustomEntry.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datacatalog&page=editor&open_in_editor=samples/createCustomEntry.js,samples/README.md) - -__Usage:__ - - -`node samples/createCustomEntry.js` - - ------ - - - - -### Create Fileset - -View the [source code](https://github.com/googleapis/nodejs-datacatalog/blob/main/samples/createFileset.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datacatalog&page=editor&open_in_editor=samples/createFileset.js,samples/README.md) - -__Usage:__ - - -`node samples/createFileset.js` - - ------ - - - - -### Grant Tag Template User Role - -View the [source code](https://github.com/googleapis/nodejs-datacatalog/blob/main/samples/grantTagTemplateUserRole.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datacatalog&page=editor&open_in_editor=samples/grantTagTemplateUserRole.js,samples/README.md) - -__Usage:__ - - -`node samples/grantTagTemplateUserRole.js` - - ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/nodejs-datacatalog/blob/main/samples/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datacatalog&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) - -__Usage:__ - - -`node samples/quickstart.js` - - ------ - - - - -### Search Assets - -View the [source code](https://github.com/googleapis/nodejs-datacatalog/blob/main/samples/searchAssets.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datacatalog&page=editor&open_in_editor=samples/searchAssets.js,samples/README.md) - -__Usage:__ - - -`node samples/searchAssets.js` - - - - - - -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datacatalog&page=editor&open_in_editor=samples/README.md -[product-docs]: https://cloud.google.com/data-catalog/ diff --git a/samples/createCustomEntry.js b/samples/createCustomEntry.js deleted file mode 100644 index 56ef755f..00000000 --- a/samples/createCustomEntry.js +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -async function main(projectId, entryGroupId, entryId, tagTemplateId) { - // [START data_catalog_create_custom_entry] - // Import the Google Cloud client library. - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - const datacatalog = new DataCatalogClient(); - - async function createCustomEntry() { - // Create a custom entry within an entry group. - - /** - * TODO(developer): Uncomment the following lines before running the sample. - */ - // const projectId = 'my_project'; - // const entryGroupId = 'my_entry_group'; - // const entryId = 'my_entry'; - // const tagTemplateId = 'my_tag_template'; - - // Currently, Data Catalog stores metadata in the us-central1 region. - const location = 'us-central1'; - - // Delete any pre-existing Entry with the same name - // that will be used to create the new Entry. - try { - const entryName = datacatalog.entryPath( - projectId, - location, - entryGroupId, - entryId - ); - await datacatalog.deleteEntry({name: entryName}); - console.log(`Deleted Entry: ${entryName}`); - } catch (err) { - console.log('Entry does not exist.'); - } - - // Delete any pre-existing Entry Group with the same name - // that will be used to construct the new EntryGroup. - try { - const entryGroupName = datacatalog.entryGroupPath( - projectId, - location, - entryGroupId - ); - await datacatalog.deleteEntryGroup({name: entryGroupName}); - console.log(`Deleted Entry Group: ${entryGroupName}`); - } catch (err) { - console.log('Entry Group does not exist.'); - } - - // Delete any pre-existing Template with the same name - // that will be used to create a new Template. - const tagTemplateName = datacatalog.tagTemplatePath( - projectId, - location, - tagTemplateId - ); - - let tagTemplateRequest = { - name: tagTemplateName, - force: true, - }; - - try { - await datacatalog.deleteTagTemplate(tagTemplateRequest); - console.log(`Deleted template: ${tagTemplateName}`); - } catch (error) { - console.log(`Cannot delete template: ${tagTemplateName}`); - } - - // Construct the EntryGroup for the EntryGroup request. - const entryGroup = { - displayName: 'My awesome Entry Group', - description: 'This Entry Group represents an external system', - }; - - // Construct the EntryGroup request to be sent by the client. - const entryGroupRequest = { - parent: datacatalog.locationPath(projectId, location), - entryGroupId: entryGroupId, - entryGroup: entryGroup, - }; - - // Use the client to send the API request. - const [createdEntryGroup] = await datacatalog.createEntryGroup( - entryGroupRequest - ); - console.log(`Created entry group: ${createdEntryGroup.name}`); - - // Construct the Entry for the Entry request. - const entry = { - userSpecifiedSystem: 'onprem_data_system', - userSpecifiedType: 'onprem_data_asset', - displayName: 'My awesome data asset', - description: 'This data asset is managed by an external system.', - linkedResource: '//my-onprem-server.com/dataAssets/my-awesome-data-asset', - schema: { - columns: [ - { - column: 'first_column', - description: 'This columns consists of ....', - mode: 'NULLABLE', - type: 'STRING', - }, - { - column: 'second_column', - description: 'This columns consists of ....', - mode: 'NULLABLE', - type: 'DOUBLE', - }, - ], - }, - }; - - // Construct the Entry request to be sent by the client. - const entryRequest = { - parent: datacatalog.entryGroupPath(projectId, location, entryGroupId), - entryId: entryId, - entry: entry, - }; - - // Use the client to send the API request. - const [createdEntry] = await datacatalog.createEntry(entryRequest); - console.log(`Created entry: ${createdEntry.name}`); - - // Create a Tag Template. - // For more field types, including ENUM, please refer to - // https://cloud.google.com/data-catalog/docs/quickstarts/quickstart-search-tag#data-catalog-quickstart-nodejs. - const fieldSource = { - displayName: 'Source of data asset', - type: { - primitiveType: 'STRING', - }, - }; - - const tagTemplate = { - displayName: 'Demo Tag Template', - fields: { - source: fieldSource, - }, - }; - - tagTemplateRequest = { - parent: datacatalog.locationPath(projectId, location), - tagTemplateId: tagTemplateId, - tagTemplate: tagTemplate, - }; - - // Use the client to send the API request. - const [createdTagTemplate] = await datacatalog.createTagTemplate( - tagTemplateRequest - ); - console.log(`Created template: ${createdTagTemplate.name}`); - - // Attach a Tag to the custom Entry. - const tag = { - template: createdTagTemplate.name, - fields: { - source: { - stringValue: 'On-premises system name', - }, - }, - }; - - const tagRequest = { - parent: createdEntry.name, - tag: tag, - }; - - // Use the client to send the API request. - const [createdTag] = await datacatalog.createTag(tagRequest); - console.log(`Created tag: ${createdTag.name}`); - } - createCustomEntry(); - // [END data_catalog_create_custom_entry] -} -main(...process.argv.slice(2)); diff --git a/samples/createFileset.js b/samples/createFileset.js deleted file mode 100644 index ef528d12..00000000 --- a/samples/createFileset.js +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -async function main(projectId, entryGroupId, entryId) { - // [START data_catalog_create_fileset] - // Import the Google Cloud client library. - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - const datacatalog = new DataCatalogClient(); - - async function createFileset() { - // Create a fileset within an entry group. - - /** - * TODO(developer): Uncomment the following lines before running the sample. - */ - // const projectId = 'my_project'; - // const entryGroupId = 'my_entry_group'; - // const entryId = 'my_entry'; - - // Currently, Data Catalog stores metadata in the us-central1 region. - const location = 'us-central1'; - - // Delete any pre-existing Entry with the same name that will be used - // when creating the new Entry. - try { - const formattedName = datacatalog.entryPath( - projectId, - location, - entryGroupId, - entryId - ); - await datacatalog.deleteEntry({name: formattedName}); - } catch (err) { - console.log('Entry does not exist.'); - } - - // Delete any pre-existing Entry Group with the same name - // that will be used to create the new Entry Group. - try { - const formattedName = datacatalog.entryGroupPath( - projectId, - location, - entryGroupId - ); - await datacatalog.deleteEntryGroup({name: formattedName}); - } catch (err) { - console.log('Entry Group does not exist.'); - } - - // Construct the Entry Group for the Entry Group request. - const entryGroup = { - displayName: 'My Fileset Entry Group', - description: 'This Entry Group consists of ....', - }; - - // Construct the Entry Group request to be sent by the client. - const entryGroupRequest = { - parent: datacatalog.locationPath(projectId, location), - entryGroupId: entryGroupId, - entryGroup: entryGroup, - }; - - // Use the client to send the API request. - await datacatalog.createEntryGroup(entryGroupRequest); - - // Construct the Entry for the Entry request. - const FILESET_TYPE = 4; - - const entry = { - displayName: 'My Fileset', - description: 'This fileset consists of ....', - gcsFilesetSpec: {filePatterns: ['gs://my_bucket/*']}, - schema: { - columns: [ - { - column: 'city', - description: 'City', - mode: 'NULLABLE', - type: 'STRING', - }, - { - column: 'state', - description: 'State', - mode: 'NULLABLE', - type: 'STRING', - }, - { - column: 'addresses', - description: 'Addresses', - mode: 'REPEATED', - subcolumns: [ - { - column: 'city', - description: 'City', - mode: 'NULLABLE', - type: 'STRING', - }, - { - column: 'state', - description: 'State', - mode: 'NULLABLE', - type: 'STRING', - }, - ], - type: 'RECORD', - }, - ], - }, - type: FILESET_TYPE, - }; - - // Construct the Entry request to be sent by the client. - const request = { - parent: datacatalog.entryGroupPath(projectId, location, entryGroupId), - entryId: entryId, - entry: entry, - }; - - // Use the client to send the API request. - const [response] = await datacatalog.createEntry(request); - - console.log(`Name: ${response.name}`); - console.log(`Display name: ${response.displayName}`); - console.log(`Type: ${response.type}`); - } - createFileset(); - // [END data_catalog_create_fileset] -} -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.create_entry.js b/samples/generated/v1/data_catalog.create_entry.js deleted file mode 100644 index d1dfb2d4..00000000 --- a/samples/generated/v1/data_catalog.create_entry.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, entryId, entry) { - // [START datacatalog_v1_generated_DataCatalog_CreateEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry group this entry belongs to. - * Note: The entry itself and its child resources might not be stored in - * the location specified in its name. - */ - // const parent = 'abc123' - /** - * Required. The ID of the entry to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * and underscores (_). - * The maximum size is 64 bytes when encoded in UTF-8. - */ - // const entryId = 'abc123' - /** - * Required. The entry to create. - */ - // const entry = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateEntry() { - // Construct request - const request = { - parent, - entryId, - entry, - }; - - // Run request - const response = await datacatalogClient.createEntry(request); - console.log(response); - } - - callCreateEntry(); - // [END datacatalog_v1_generated_DataCatalog_CreateEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.create_entry_group.js b/samples/generated/v1/data_catalog.create_entry_group.js deleted file mode 100644 index f3a5c36d..00000000 --- a/samples/generated/v1/data_catalog.create_entry_group.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, entryGroupId) { - // [START datacatalog_v1_generated_DataCatalog_CreateEntryGroup_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 names of the project and location that the new entry group belongs to. - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - */ - // const parent = 'abc123' - /** - * Required. The ID of the entry group to create. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - */ - // const entryGroupId = 'abc123' - /** - * The entry group to create. Defaults to empty. - */ - // const entryGroup = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateEntryGroup() { - // Construct request - const request = { - parent, - entryGroupId, - }; - - // Run request - const response = await datacatalogClient.createEntryGroup(request); - console.log(response); - } - - callCreateEntryGroup(); - // [END datacatalog_v1_generated_DataCatalog_CreateEntryGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.create_tag.js b/samples/generated/v1/data_catalog.create_tag.js deleted file mode 100644 index bfe5b1f7..00000000 --- a/samples/generated/v1/data_catalog.create_tag.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, tag) { - // [START datacatalog_v1_generated_DataCatalog_CreateTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the resource to attach this tag to. - * Tags can be attached to entries or entry groups. An entry can have up to - * 1000 attached tags. - * Note: The tag and its child resources might not be stored in - * the location specified in its name. - */ - // const parent = 'abc123' - /** - * Required. The tag to create. - */ - // const tag = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateTag() { - // Construct request - const request = { - parent, - tag, - }; - - // Run request - const response = await datacatalogClient.createTag(request); - console.log(response); - } - - callCreateTag(); - // [END datacatalog_v1_generated_DataCatalog_CreateTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.create_tag_template.js b/samples/generated/v1/data_catalog.create_tag_template.js deleted file mode 100644 index cd3743b2..00000000 --- a/samples/generated/v1/data_catalog.create_tag_template.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, tagTemplateId, tagTemplate) { - // [START datacatalog_v1_generated_DataCatalog_CreateTagTemplate_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the project and the template location - * region (https://cloud.google.com/data-catalog/docs/concepts/regions). - */ - // const parent = 'abc123' - /** - * Required. The ID of the tag template to create. - * The ID must contain only lowercase letters (a-z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - */ - // const tagTemplateId = 'abc123' - /** - * Required. The tag template to create. - */ - // const tagTemplate = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateTagTemplate() { - // Construct request - const request = { - parent, - tagTemplateId, - tagTemplate, - }; - - // Run request - const response = await datacatalogClient.createTagTemplate(request); - console.log(response); - } - - callCreateTagTemplate(); - // [END datacatalog_v1_generated_DataCatalog_CreateTagTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.create_tag_template_field.js b/samples/generated/v1/data_catalog.create_tag_template_field.js deleted file mode 100644 index becb0117..00000000 --- a/samples/generated/v1/data_catalog.create_tag_template_field.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, tagTemplateFieldId, tagTemplateField) { - // [START datacatalog_v1_generated_DataCatalog_CreateTagTemplateField_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the project and the template location - * region (https://cloud.google.com/data-catalog/docs/concepts/regions). - */ - // const parent = 'abc123' - /** - * Required. The ID of the tag template field to create. - * Note: Adding a required field to an existing template is *not* allowed. - * Field IDs can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - */ - // const tagTemplateFieldId = 'abc123' - /** - * Required. The tag template field to create. - */ - // const tagTemplateField = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateTagTemplateField() { - // Construct request - const request = { - parent, - tagTemplateFieldId, - tagTemplateField, - }; - - // Run request - const response = await datacatalogClient.createTagTemplateField(request); - console.log(response); - } - - callCreateTagTemplateField(); - // [END datacatalog_v1_generated_DataCatalog_CreateTagTemplateField_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.delete_entry.js b/samples/generated/v1/data_catalog.delete_entry.js deleted file mode 100644 index 4d2b83d6..00000000 --- a/samples/generated/v1/data_catalog.delete_entry.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_DeleteEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry to delete. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteEntry() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deleteEntry(request); - console.log(response); - } - - callDeleteEntry(); - // [END datacatalog_v1_generated_DataCatalog_DeleteEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.delete_entry_group.js b/samples/generated/v1/data_catalog.delete_entry_group.js deleted file mode 100644 index f2e49cbe..00000000 --- a/samples/generated/v1/data_catalog.delete_entry_group.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_DeleteEntryGroup_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry group to delete. - */ - // const name = 'abc123' - /** - * Optional. If true, deletes all entries in the entry group. - */ - // const force = true - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteEntryGroup() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deleteEntryGroup(request); - console.log(response); - } - - callDeleteEntryGroup(); - // [END datacatalog_v1_generated_DataCatalog_DeleteEntryGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.delete_tag.js b/samples/generated/v1/data_catalog.delete_tag.js deleted file mode 100644 index 605568fd..00000000 --- a/samples/generated/v1/data_catalog.delete_tag.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_DeleteTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag to delete. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteTag() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deleteTag(request); - console.log(response); - } - - callDeleteTag(); - // [END datacatalog_v1_generated_DataCatalog_DeleteTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.delete_tag_template.js b/samples/generated/v1/data_catalog.delete_tag_template.js deleted file mode 100644 index 00e7681c..00000000 --- a/samples/generated/v1/data_catalog.delete_tag_template.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, force) { - // [START datacatalog_v1_generated_DataCatalog_DeleteTagTemplate_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template to delete. - */ - // const name = 'abc123' - /** - * Required. If true, deletes all tags that use this template. - * Currently, `true` is the only supported value. - */ - // const force = true - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteTagTemplate() { - // Construct request - const request = { - name, - force, - }; - - // Run request - const response = await datacatalogClient.deleteTagTemplate(request); - console.log(response); - } - - callDeleteTagTemplate(); - // [END datacatalog_v1_generated_DataCatalog_DeleteTagTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.delete_tag_template_field.js b/samples/generated/v1/data_catalog.delete_tag_template_field.js deleted file mode 100644 index 2ca7bb23..00000000 --- a/samples/generated/v1/data_catalog.delete_tag_template_field.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, force) { - // [START datacatalog_v1_generated_DataCatalog_DeleteTagTemplateField_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template field to delete. - */ - // const name = 'abc123' - /** - * Required. If true, deletes this field from any tags that use it. - * Currently, `true` is the only supported value. - */ - // const force = true - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteTagTemplateField() { - // Construct request - const request = { - name, - force, - }; - - // Run request - const response = await datacatalogClient.deleteTagTemplateField(request); - console.log(response); - } - - callDeleteTagTemplateField(); - // [END datacatalog_v1_generated_DataCatalog_DeleteTagTemplateField_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.get_entry.js b/samples/generated/v1/data_catalog.get_entry.js deleted file mode 100644 index 02020d00..00000000 --- a/samples/generated/v1/data_catalog.get_entry.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_GetEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry to get. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callGetEntry() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getEntry(request); - console.log(response); - } - - callGetEntry(); - // [END datacatalog_v1_generated_DataCatalog_GetEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.get_entry_group.js b/samples/generated/v1/data_catalog.get_entry_group.js deleted file mode 100644 index 86419901..00000000 --- a/samples/generated/v1/data_catalog.get_entry_group.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_GetEntryGroup_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry group to get. - */ - // const name = 'abc123' - /** - * The fields to return. If empty or omitted, all fields are returned. - */ - // const readMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callGetEntryGroup() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getEntryGroup(request); - console.log(response); - } - - callGetEntryGroup(); - // [END datacatalog_v1_generated_DataCatalog_GetEntryGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.get_iam_policy.js b/samples/generated/v1/data_catalog.get_iam_policy.js deleted file mode 100644 index 6e5ccf86..00000000 --- a/samples/generated/v1/data_catalog.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource) { - // [START datacatalog_v1_generated_DataCatalog_GetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - */ - // const options = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callGetIamPolicy() { - // Construct request - const request = { - resource, - }; - - // Run request - const response = await datacatalogClient.getIamPolicy(request); - console.log(response); - } - - callGetIamPolicy(); - // [END datacatalog_v1_generated_DataCatalog_GetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.get_tag_template.js b/samples/generated/v1/data_catalog.get_tag_template.js deleted file mode 100644 index 391978d4..00000000 --- a/samples/generated/v1/data_catalog.get_tag_template.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_GetTagTemplate_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template to get. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callGetTagTemplate() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getTagTemplate(request); - console.log(response); - } - - callGetTagTemplate(); - // [END datacatalog_v1_generated_DataCatalog_GetTagTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.list_entries.js b/samples/generated/v1/data_catalog.list_entries.js deleted file mode 100644 index bd5f034e..00000000 --- a/samples/generated/v1/data_catalog.list_entries.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_ListEntries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry group that contains the entries to list. - * Can be provided in URL format. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. Default is 10. Maximum limit is - * 1000. Throws an invalid argument if `page_size` is more than 1000. - */ - // const pageSize = 1234 - /** - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - */ - // const pageToken = 'abc123' - /** - * The fields to return for each entry. If empty or omitted, all - * fields are returned. - * For example, to return a list of entries with only the `name` field, - * set `read_mask` to only one path with the `name` value. - */ - // const readMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callListEntries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listEntriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntries(); - // [END datacatalog_v1_generated_DataCatalog_ListEntries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.list_entry_groups.js b/samples/generated/v1/data_catalog.list_entry_groups.js deleted file mode 100644 index d4de4683..00000000 --- a/samples/generated/v1/data_catalog.list_entry_groups.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_ListEntryGroups_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the location that contains the entry groups to list. - * Can be provided as a URL. - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of items to return. - * Default is 10. Maximum limit is 1000. - * Throws an invalid argument if `page_size` is greater than 1000. - */ - // const pageSize = 1234 - /** - * Optional. Pagination token that specifies the next page to return. - * If empty, returns the first page. - */ - // const pageToken = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callListEntryGroups() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listEntryGroupsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntryGroups(); - // [END datacatalog_v1_generated_DataCatalog_ListEntryGroups_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.list_tags.js b/samples/generated/v1/data_catalog.list_tags.js deleted file mode 100644 index dcec692f..00000000 --- a/samples/generated/v1/data_catalog.list_tags.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_ListTags_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Data Catalog resource to list the tags of. - * The resource can be an Entry google.cloud.datacatalog.v1.Entry - * or an EntryGroup google.cloud.datacatalog.v1.EntryGroup - * (without `/entries/{entries}` at the end). - */ - // const parent = 'abc123' - /** - * The maximum number of tags to return. Default is 10. Maximum limit is 1000. - */ - // const pageSize = 1234 - /** - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - */ - // const pageToken = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callListTags() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listTagsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTags(); - // [END datacatalog_v1_generated_DataCatalog_ListTags_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.lookup_entry.js b/samples/generated/v1/data_catalog.lookup_entry.js deleted file mode 100644 index 8638c6d1..00000000 --- a/samples/generated/v1/data_catalog.lookup_entry.js +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_LookupEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 full name of the Google Cloud Platform resource the Data Catalog - * entry represents. For more information, see Full Resource Name - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * Full names are case-sensitive. For example: - * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` - */ - // const linkedResource = 'abc123' - /** - * The SQL name of the entry. SQL names are case-sensitive. - * Examples: - * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` - * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` - * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` - * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` - * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` - * Identifiers (`*_ID`) should comply with the - * Lexical structure in Standard SQL - * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). - */ - // const sqlResource = 'abc123' - /** - * Fully qualified name (FQN) of the resource. - * FQNs take two forms: - * * For non-regionalized resources: - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * * For regionalized resources: - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * Example for a DPMS table: - * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` - */ - // const fullyQualifiedName = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callLookupEntry() { - // Construct request - const request = { - }; - - // Run request - const response = await datacatalogClient.lookupEntry(request); - console.log(response); - } - - callLookupEntry(); - // [END datacatalog_v1_generated_DataCatalog_LookupEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.modify_entry_contacts.js b/samples/generated/v1/data_catalog.modify_entry_contacts.js deleted file mode 100644 index 87ff7d87..00000000 --- a/samples/generated/v1/data_catalog.modify_entry_contacts.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, contacts) { - // [START datacatalog_v1_generated_DataCatalog_ModifyEntryContacts_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 full resource name of the entry. - */ - // const name = 'abc123' - /** - * Required. The new value for the Contacts. - */ - // const contacts = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callModifyEntryContacts() { - // Construct request - const request = { - name, - contacts, - }; - - // Run request - const response = await datacatalogClient.modifyEntryContacts(request); - console.log(response); - } - - callModifyEntryContacts(); - // [END datacatalog_v1_generated_DataCatalog_ModifyEntryContacts_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.modify_entry_overview.js b/samples/generated/v1/data_catalog.modify_entry_overview.js deleted file mode 100644 index f2f47b92..00000000 --- a/samples/generated/v1/data_catalog.modify_entry_overview.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, entryOverview) { - // [START datacatalog_v1_generated_DataCatalog_ModifyEntryOverview_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 full resource name of the entry. - */ - // const name = 'abc123' - /** - * Required. The new value for the Entry Overview. - */ - // const entryOverview = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callModifyEntryOverview() { - // Construct request - const request = { - name, - entryOverview, - }; - - // Run request - const response = await datacatalogClient.modifyEntryOverview(request); - console.log(response); - } - - callModifyEntryOverview(); - // [END datacatalog_v1_generated_DataCatalog_ModifyEntryOverview_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.rename_tag_template_field.js b/samples/generated/v1/data_catalog.rename_tag_template_field.js deleted file mode 100644 index 717b02e4..00000000 --- a/samples/generated/v1/data_catalog.rename_tag_template_field.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, newTagTemplateFieldId) { - // [START datacatalog_v1_generated_DataCatalog_RenameTagTemplateField_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template field. - */ - // const name = 'abc123' - /** - * Required. The new ID of this tag template field. For example, `my_new_field`. - */ - // const newTagTemplateFieldId = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callRenameTagTemplateField() { - // Construct request - const request = { - name, - newTagTemplateFieldId, - }; - - // Run request - const response = await datacatalogClient.renameTagTemplateField(request); - console.log(response); - } - - callRenameTagTemplateField(); - // [END datacatalog_v1_generated_DataCatalog_RenameTagTemplateField_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js b/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js deleted file mode 100644 index d9399c4d..00000000 --- a/samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, newEnumValueDisplayName) { - // [START datacatalog_v1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the enum field value. - */ - // const name = 'abc123' - /** - * Required. The new display name of the enum value. For example, `my_new_enum_value`. - */ - // const newEnumValueDisplayName = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callRenameTagTemplateFieldEnumValue() { - // Construct request - const request = { - name, - newEnumValueDisplayName, - }; - - // Run request - const response = await datacatalogClient.renameTagTemplateFieldEnumValue(request); - console.log(response); - } - - callRenameTagTemplateFieldEnumValue(); - // [END datacatalog_v1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.search_catalog.js b/samples/generated/v1/data_catalog.search_catalog.js deleted file mode 100644 index bf17f43a..00000000 --- a/samples/generated/v1/data_catalog.search_catalog.js +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(scope) { - // [START datacatalog_v1_generated_DataCatalog_SearchCatalog_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 scope of this search request. - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - */ - // const scope = {} - /** - * Optional. The query string with a minimum of 3 characters and specific syntax. - * For more information, see - * Data Catalog search - * syntax (https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * A query string can be a simple `xyz` or qualified by predicates: - * * `name:x` - * * `column:y` - * * `description:z` - */ - // const query = 'abc123' - /** - * Number of results to return in a single search page. - * Can't be negative or 0, defaults to 10 in this case. - * The maximum number is 1000. If exceeded, throws an "invalid argument" - * exception. - */ - // const pageSize = 1234 - /** - * Optional. Pagination token that, if specified, returns the next page of search - * results. If empty, returns the first page. - * This token is returned in the SearchCatalogResponse.next_page_token google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token - * field of the response to a previous - * SearchCatalogRequest google.cloud.datacatalog.v1.DataCatalog.SearchCatalog - * call. - */ - // const pageToken = 'abc123' - /** - * Specifies the order of results. - * Currently supported case-sensitive values are: - * * `relevance` that can only be descending - * * `last_modified_timestamp asc|desc` with descending (`desc`) as default - * * `default` that can only be descending - * If this parameter is omitted, it defaults to the descending `relevance`. - */ - // const orderBy = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callSearchCatalog() { - // Construct request - const request = { - scope, - }; - - // Run request - const iterable = await datacatalogClient.searchCatalogAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callSearchCatalog(); - // [END datacatalog_v1_generated_DataCatalog_SearchCatalog_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.set_iam_policy.js b/samples/generated/v1/data_catalog.set_iam_policy.js deleted file mode 100644 index 0e19e46a..00000000 --- a/samples/generated/v1/data_catalog.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, policy) { - // [START datacatalog_v1_generated_DataCatalog_SetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - */ - // const policy = {} - /** - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * `paths: "bindings, etag"` - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callSetIamPolicy() { - // Construct request - const request = { - resource, - policy, - }; - - // Run request - const response = await datacatalogClient.setIamPolicy(request); - console.log(response); - } - - callSetIamPolicy(); - // [END datacatalog_v1_generated_DataCatalog_SetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.star_entry.js b/samples/generated/v1/data_catalog.star_entry.js deleted file mode 100644 index 45324cc2..00000000 --- a/samples/generated/v1/data_catalog.star_entry.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_StarEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry to mark as starred. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callStarEntry() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.starEntry(request); - console.log(response); - } - - callStarEntry(); - // [END datacatalog_v1_generated_DataCatalog_StarEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.test_iam_permissions.js b/samples/generated/v1/data_catalog.test_iam_permissions.js deleted file mode 100644 index 34bbf3ce..00000000 --- a/samples/generated/v1/data_catalog.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, permissions) { - // [START datacatalog_v1_generated_DataCatalog_TestIamPermissions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). - */ - // const permissions = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callTestIamPermissions() { - // Construct request - const request = { - resource, - permissions, - }; - - // Run request - const response = await datacatalogClient.testIamPermissions(request); - console.log(response); - } - - callTestIamPermissions(); - // [END datacatalog_v1_generated_DataCatalog_TestIamPermissions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.unstar_entry.js b/samples/generated/v1/data_catalog.unstar_entry.js deleted file mode 100644 index a51d63a8..00000000 --- a/samples/generated/v1/data_catalog.unstar_entry.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_DataCatalog_UnstarEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry to mark as **not** starred. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUnstarEntry() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.unstarEntry(request); - console.log(response); - } - - callUnstarEntry(); - // [END datacatalog_v1_generated_DataCatalog_UnstarEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.update_entry.js b/samples/generated/v1/data_catalog.update_entry.js deleted file mode 100644 index 2662f380..00000000 --- a/samples/generated/v1/data_catalog.update_entry.js +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entry) { - // [START datacatalog_v1_generated_DataCatalog_UpdateEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Updates for the entry. The `name` field must be set. - */ - // const entry = {} - /** - * Names of fields whose values to overwrite on an entry. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * You can modify only the fields listed below. - * For entries with type `DATA_STREAM`: - * * `schema` - * For entries with type `FILESET`: - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * For entries with `user_specified_type`: - * * `schema` - * * `display_name` - * * `description` - * * `user_specified_type` - * * `user_specified_system` - * * `linked_resource` - * * `source_system_timestamps` - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateEntry() { - // Construct request - const request = { - entry, - }; - - // Run request - const response = await datacatalogClient.updateEntry(request); - console.log(response); - } - - callUpdateEntry(); - // [END datacatalog_v1_generated_DataCatalog_UpdateEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.update_entry_group.js b/samples/generated/v1/data_catalog.update_entry_group.js deleted file mode 100644 index 124d4ef0..00000000 --- a/samples/generated/v1/data_catalog.update_entry_group.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entryGroup) { - // [START datacatalog_v1_generated_DataCatalog_UpdateEntryGroup_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Updates for the entry group. The `name` field must be set. - */ - // const entryGroup = {} - /** - * Names of fields whose values to overwrite on an entry group. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateEntryGroup() { - // Construct request - const request = { - entryGroup, - }; - - // Run request - const response = await datacatalogClient.updateEntryGroup(request); - console.log(response); - } - - callUpdateEntryGroup(); - // [END datacatalog_v1_generated_DataCatalog_UpdateEntryGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.update_tag.js b/samples/generated/v1/data_catalog.update_tag.js deleted file mode 100644 index ee60e19a..00000000 --- a/samples/generated/v1/data_catalog.update_tag.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tag) { - // [START datacatalog_v1_generated_DataCatalog_UpdateTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 updated tag. The "name" field must be set. - */ - // const tag = {} - /** - * Names of fields whose values to overwrite on a tag. Currently, a tag has - * the only modifiable field with the name `fields`. - * In general, if this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateTag() { - // Construct request - const request = { - tag, - }; - - // Run request - const response = await datacatalogClient.updateTag(request); - console.log(response); - } - - callUpdateTag(); - // [END datacatalog_v1_generated_DataCatalog_UpdateTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.update_tag_template.js b/samples/generated/v1/data_catalog.update_tag_template.js deleted file mode 100644 index 863a3706..00000000 --- a/samples/generated/v1/data_catalog.update_tag_template.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tagTemplate) { - // [START datacatalog_v1_generated_DataCatalog_UpdateTagTemplate_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 template to update. The `name` field must be set. - */ - // const tagTemplate = {} - /** - * Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` and `is_publicly_readable` can be overwritten. - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * Note: Updating the `is_publicly_readable` field may require up to 12 - * hours to take effect in search results. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateTagTemplate() { - // Construct request - const request = { - tagTemplate, - }; - - // Run request - const response = await datacatalogClient.updateTagTemplate(request); - console.log(response); - } - - callUpdateTagTemplate(); - // [END datacatalog_v1_generated_DataCatalog_UpdateTagTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/data_catalog.update_tag_template_field.js b/samples/generated/v1/data_catalog.update_tag_template_field.js deleted file mode 100644 index adb27ecd..00000000 --- a/samples/generated/v1/data_catalog.update_tag_template_field.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, tagTemplateField) { - // [START datacatalog_v1_generated_DataCatalog_UpdateTagTemplateField_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template field. - */ - // const name = 'abc123' - /** - * Required. The template to update. - */ - // const tagTemplateField = {} - /** - * Optional. Names of fields whose values to overwrite on an individual field of a tag - * template. The following fields are modifiable: - * * `display_name` - * * `type.enum_type` - * * `is_required` - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the request - * body, their values are emptied with one exception: when updating an enum - * type, the provided values are merged with the existing values. Therefore, - * enum values can only be added, existing enum values cannot be deleted or - * renamed. - * Additionally, updating a template field from optional to required is - * *not* allowed. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateTagTemplateField() { - // Construct request - const request = { - name, - tagTemplateField, - }; - - // Run request - const response = await datacatalogClient.updateTagTemplateField(request); - console.log(response); - } - - callUpdateTagTemplateField(); - // [END datacatalog_v1_generated_DataCatalog_UpdateTagTemplateField_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.create_policy_tag.js b/samples/generated/v1/policy_tag_manager.create_policy_tag.js deleted file mode 100644 index c7251887..00000000 --- a/samples/generated/v1/policy_tag_manager.create_policy_tag.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_CreatePolicyTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the taxonomy that the policy tag will belong to. - */ - // const parent = 'abc123' - /** - * The policy tag to create. - */ - // const policyTag = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callCreatePolicyTag() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await datacatalogClient.createPolicyTag(request); - console.log(response); - } - - callCreatePolicyTag(); - // [END datacatalog_v1_generated_PolicyTagManager_CreatePolicyTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.create_taxonomy.js b/samples/generated/v1/policy_tag_manager.create_taxonomy.js deleted file mode 100644 index edc018b4..00000000 --- a/samples/generated/v1/policy_tag_manager.create_taxonomy.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_CreateTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the project that the taxonomy will belong to. - */ - // const parent = 'abc123' - /** - * The taxonomy to create. - */ - // const taxonomy = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callCreateTaxonomy() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await datacatalogClient.createTaxonomy(request); - console.log(response); - } - - callCreateTaxonomy(); - // [END datacatalog_v1_generated_PolicyTagManager_CreateTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.delete_policy_tag.js b/samples/generated/v1/policy_tag_manager.delete_policy_tag.js deleted file mode 100644 index c99a910c..00000000 --- a/samples/generated/v1/policy_tag_manager.delete_policy_tag.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_DeletePolicyTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the policy tag to delete. - * Note: All of its descendant policy tags are also deleted. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callDeletePolicyTag() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deletePolicyTag(request); - console.log(response); - } - - callDeletePolicyTag(); - // [END datacatalog_v1_generated_PolicyTagManager_DeletePolicyTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.delete_taxonomy.js b/samples/generated/v1/policy_tag_manager.delete_taxonomy.js deleted file mode 100644 index 61a78199..00000000 --- a/samples/generated/v1/policy_tag_manager.delete_taxonomy.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_DeleteTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the taxonomy to delete. - * Note: All policy tags in this taxonomy are also deleted. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callDeleteTaxonomy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deleteTaxonomy(request); - console.log(response); - } - - callDeleteTaxonomy(); - // [END datacatalog_v1_generated_PolicyTagManager_DeleteTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.get_iam_policy.js b/samples/generated/v1/policy_tag_manager.get_iam_policy.js deleted file mode 100644 index 22a676b6..00000000 --- a/samples/generated/v1/policy_tag_manager.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource) { - // [START datacatalog_v1_generated_PolicyTagManager_GetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - */ - // const options = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callGetIamPolicy() { - // Construct request - const request = { - resource, - }; - - // Run request - const response = await datacatalogClient.getIamPolicy(request); - console.log(response); - } - - callGetIamPolicy(); - // [END datacatalog_v1_generated_PolicyTagManager_GetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.get_policy_tag.js b/samples/generated/v1/policy_tag_manager.get_policy_tag.js deleted file mode 100644 index d0870cb1..00000000 --- a/samples/generated/v1/policy_tag_manager.get_policy_tag.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_GetPolicyTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the policy tag. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callGetPolicyTag() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getPolicyTag(request); - console.log(response); - } - - callGetPolicyTag(); - // [END datacatalog_v1_generated_PolicyTagManager_GetPolicyTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.get_taxonomy.js b/samples/generated/v1/policy_tag_manager.get_taxonomy.js deleted file mode 100644 index 32b5d8a1..00000000 --- a/samples/generated/v1/policy_tag_manager.get_taxonomy.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_GetTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the taxonomy to get. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callGetTaxonomy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getTaxonomy(request); - console.log(response); - } - - callGetTaxonomy(); - // [END datacatalog_v1_generated_PolicyTagManager_GetTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.list_policy_tags.js b/samples/generated/v1/policy_tag_manager.list_policy_tags.js deleted file mode 100644 index bb5eb3c3..00000000 --- a/samples/generated/v1/policy_tag_manager.list_policy_tags.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_ListPolicyTags_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the taxonomy to list the policy tags of. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. - * If not set, defaults to 50. - */ - // const pageSize = 1234 - /** - * The pagination token of the next results page. If not set, returns the - * first page. - * The token is returned in the response to a previous list request. - */ - // const pageToken = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callListPolicyTags() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listPolicyTagsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPolicyTags(); - // [END datacatalog_v1_generated_PolicyTagManager_ListPolicyTags_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.list_taxonomies.js b/samples/generated/v1/policy_tag_manager.list_taxonomies.js deleted file mode 100644 index 2a996737..00000000 --- a/samples/generated/v1/policy_tag_manager.list_taxonomies.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_ListTaxonomies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the project to list the taxonomies of. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. If not set, defaults to 50. - */ - // const pageSize = 1234 - /** - * The pagination token of the next results page. If not set, - * the first page is returned. - * The token is returned in the response to a previous list request. - */ - // const pageToken = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callListTaxonomies() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listTaxonomiesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTaxonomies(); - // [END datacatalog_v1_generated_PolicyTagManager_ListTaxonomies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.set_iam_policy.js b/samples/generated/v1/policy_tag_manager.set_iam_policy.js deleted file mode 100644 index 83dd857f..00000000 --- a/samples/generated/v1/policy_tag_manager.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, policy) { - // [START datacatalog_v1_generated_PolicyTagManager_SetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - */ - // const policy = {} - /** - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * `paths: "bindings, etag"` - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callSetIamPolicy() { - // Construct request - const request = { - resource, - policy, - }; - - // Run request - const response = await datacatalogClient.setIamPolicy(request); - console.log(response); - } - - callSetIamPolicy(); - // [END datacatalog_v1_generated_PolicyTagManager_SetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.test_iam_permissions.js b/samples/generated/v1/policy_tag_manager.test_iam_permissions.js deleted file mode 100644 index 599ba399..00000000 --- a/samples/generated/v1/policy_tag_manager.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, permissions) { - // [START datacatalog_v1_generated_PolicyTagManager_TestIamPermissions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). - */ - // const permissions = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callTestIamPermissions() { - // Construct request - const request = { - resource, - permissions, - }; - - // Run request - const response = await datacatalogClient.testIamPermissions(request); - console.log(response); - } - - callTestIamPermissions(); - // [END datacatalog_v1_generated_PolicyTagManager_TestIamPermissions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.update_policy_tag.js b/samples/generated/v1/policy_tag_manager.update_policy_tag.js deleted file mode 100644 index 4fe21078..00000000 --- a/samples/generated/v1/policy_tag_manager.update_policy_tag.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_UpdatePolicyTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 policy tag to update. You can update only its description, display - * name, and parent policy tag fields. - */ - // const policyTag = {} - /** - * Specifies the fields to update. - * You can update only display name, description, and parent policy tag. - * If not set, defaults to all updatable fields. - * For more information, see FieldMask - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callUpdatePolicyTag() { - // Construct request - const request = { - }; - - // Run request - const response = await datacatalogClient.updatePolicyTag(request); - console.log(response); - } - - callUpdatePolicyTag(); - // [END datacatalog_v1_generated_PolicyTagManager_UpdatePolicyTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager.update_taxonomy.js b/samples/generated/v1/policy_tag_manager.update_taxonomy.js deleted file mode 100644 index d01378ad..00000000 --- a/samples/generated/v1/policy_tag_manager.update_taxonomy.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManager_UpdateTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 taxonomy to update. You can update only its description, display name, - * and activated policy types. - */ - // const taxonomy = {} - /** - * Specifies fields to update. If not set, defaults to all fields you can - * update. - * For more information, see FieldMask - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callUpdateTaxonomy() { - // Construct request - const request = { - }; - - // Run request - const response = await datacatalogClient.updateTaxonomy(request); - console.log(response); - } - - callUpdateTaxonomy(); - // [END datacatalog_v1_generated_PolicyTagManager_UpdateTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js b/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js deleted file mode 100644 index 3e65c734..00000000 --- a/samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, taxonomies) { - // [START datacatalog_v1_generated_PolicyTagManagerSerialization_ExportTaxonomies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the project that the exported taxonomies belong to. - */ - // const parent = 'abc123' - /** - * Required. Resource names of the taxonomies to export. - */ - // const taxonomies = 'abc123' - /** - * Serialized export taxonomies that contain all the policy - * tags as nested protocol buffers. - */ - // const serializedTaxonomies = true - - // Imports the Datacatalog library - const {PolicyTagManagerSerializationClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerSerializationClient(); - - async function callExportTaxonomies() { - // Construct request - const request = { - parent, - taxonomies, - }; - - // Run request - const response = await datacatalogClient.exportTaxonomies(request); - console.log(response); - } - - callExportTaxonomies(); - // [END datacatalog_v1_generated_PolicyTagManagerSerialization_ExportTaxonomies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js b/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js deleted file mode 100644 index fb71e56f..00000000 --- a/samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1_generated_PolicyTagManagerSerialization_ImportTaxonomies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of project that the imported taxonomies will belong to. - */ - // const parent = 'abc123' - /** - * Inline source taxonomy to import. - */ - // const inlineSource = {} - /** - * Cross-regional source taxonomy to import. - */ - // const crossRegionalSource = {} - - // Imports the Datacatalog library - const {PolicyTagManagerSerializationClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerSerializationClient(); - - async function callImportTaxonomies() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await datacatalogClient.importTaxonomies(request); - console.log(response); - } - - callImportTaxonomies(); - // [END datacatalog_v1_generated_PolicyTagManagerSerialization_ImportTaxonomies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js b/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js deleted file mode 100644 index ad684ab1..00000000 --- a/samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, serializedTaxonomy) { - // [START datacatalog_v1_generated_PolicyTagManagerSerialization_ReplaceTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the taxonomy to update. - */ - // const name = 'abc123' - /** - * Required. Taxonomy to update along with its child policy tags. - */ - // const serializedTaxonomy = {} - - // Imports the Datacatalog library - const {PolicyTagManagerSerializationClient} = require('@google-cloud/datacatalog').v1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerSerializationClient(); - - async function callReplaceTaxonomy() { - // Construct request - const request = { - name, - serializedTaxonomy, - }; - - // Run request - const response = await datacatalogClient.replaceTaxonomy(request); - console.log(response); - } - - callReplaceTaxonomy(); - // [END datacatalog_v1_generated_PolicyTagManagerSerialization_ReplaceTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json b/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json deleted file mode 100644 index fb4c42a7..00000000 --- a/samples/generated/v1/snippet_metadata.google.cloud.datacatalog.v1.json +++ /dev/null @@ -1,2163 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-datacatalog", - "version": "3.1.1", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.datacatalog.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "datacatalog_v1_generated_DataCatalog_SearchCatalog_async", - "title": "DataCatalog searchCatalog Sample", - "origin": "API_DEFINITION", - "description": " Searches Data Catalog for multiple resources like entries and tags that match a query. This is a [Custom Method] (https://cloud.google.com/apis/design/custom_methods) that doesn't return all information on a resource, only its ID and high level fields. To get more information, you can subsequently call specific get methods. Note: Data Catalog search queries don't guarantee full recall. Results that match your query might not be returned, even in subsequent result pages. Additionally, returned (and not returned) results can vary if you repeat search queries. For more information, see [Data Catalog search syntax] (https://cloud.google.com/data-catalog/docs/how-to/search-reference).", - "canonical": true, - "file": "data_catalog.search_catalog.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 96, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.SearchCatalog", - "async": true, - "parameters": [ - { - "name": "scope", - "type": ".google.cloud.datacatalog.v1.SearchCatalogRequest.Scope" - }, - { - "name": "query", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.SearchCatalogResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "SearchCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.SearchCatalog", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_CreateEntryGroup_async", - "title": "DataCatalog createEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Creates an entry group. An entry group contains logically related entries together with [Cloud Identity and Access Management](/data-catalog/docs/concepts/iam) policies. These policies specify users who can create, edit, and view entries within entry groups. Data Catalog automatically creates entry groups with names that start with the `@` symbol for the following resources: * BigQuery entries (`@bigquery`) * Pub/Sub topics (`@pubsub`) * Dataproc Metastore services (`@dataproc_metastore_{SERVICE_NAME_HASH}`) You can create your own entry groups for Cloud Storage fileset entries and custom entries together with the corresponding IAM policies. User-created entry groups can't contain the `@` symbol, it is reserved for automatically created groups. Entry groups, like entries, can be searched. A maximum of 10,000 entry groups may be created per organization across all locations. You must enable the Data Catalog API in the project identified by the `parent` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.create_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntryGroup", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entry_group_id", - "type": "TYPE_STRING" - }, - { - "name": "entry_group", - "type": ".google.cloud.datacatalog.v1.EntryGroup" - } - ], - "resultType": ".google.cloud.datacatalog.v1.EntryGroup", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "CreateEntryGroup", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_GetEntryGroup_async", - "title": "DataCatalog getEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Gets an entry group.", - "canonical": true, - "file": "data_catalog.get_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntryGroup", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1.EntryGroup", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "GetEntryGroup", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_UpdateEntryGroup_async", - "title": "DataCatalog updateEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Updates an entry group. You must enable the Data Catalog API in the project identified by the `entry_group.name` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.update_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntryGroup", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup", - "async": true, - "parameters": [ - { - "name": "entry_group", - "type": ".google.cloud.datacatalog.v1.EntryGroup" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1.EntryGroup", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateEntryGroup", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_DeleteEntryGroup_async", - "title": "DataCatalog deleteEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Deletes an entry group. You must enable the Data Catalog API in the project identified by the `name` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.delete_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntryGroup", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteEntryGroup", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_ListEntryGroups_async", - "title": "DataCatalog listEntryGroups Sample", - "origin": "API_DEFINITION", - "description": " Lists entry groups.", - "canonical": true, - "file": "data_catalog.list_entry_groups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntryGroups", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.ListEntryGroupsResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "ListEntryGroups", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_CreateEntry_async", - "title": "DataCatalog createEntry Sample", - "origin": "API_DEFINITION", - "description": " Creates an entry. You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM', or custom types. Data Catalog automatically creates entries with other types during metadata ingestion from integrated systems. You must enable the Data Catalog API in the project identified by the `parent` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). An entry group can have a maximum of 100,000 entries.", - "canonical": true, - "file": "data_catalog.create_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateEntry", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entry_id", - "type": "TYPE_STRING" - }, - { - "name": "entry", - "type": ".google.cloud.datacatalog.v1.Entry" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Entry", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "CreateEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_UpdateEntry_async", - "title": "DataCatalog updateEntry Sample", - "origin": "API_DEFINITION", - "description": " Updates an existing entry. You must enable the Data Catalog API in the project identified by the `entry.name` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.update_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateEntry", - "async": true, - "parameters": [ - { - "name": "entry", - "type": ".google.cloud.datacatalog.v1.Entry" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Entry", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_DeleteEntry_async", - "title": "DataCatalog deleteEntry Sample", - "origin": "API_DEFINITION", - "description": " Deletes an existing entry. You can delete only the entries created by the [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] method. You must enable the Data Catalog API in the project identified by the `name` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.delete_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteEntry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_GetEntry_async", - "title": "DataCatalog getEntry Sample", - "origin": "API_DEFINITION", - "description": " Gets an entry.", - "canonical": true, - "file": "data_catalog.get_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.GetEntry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Entry", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "GetEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.GetEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_LookupEntry_async", - "title": "DataCatalog lookupEntry Sample", - "origin": "API_DEFINITION", - "description": " Gets an entry by its target resource name. The resource name comes from the source Google Cloud Platform service.", - "canonical": true, - "file": "data_catalog.lookup_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "LookupEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.LookupEntry", - "async": true, - "parameters": [ - { - "name": "linked_resource", - "type": "TYPE_STRING" - }, - { - "name": "sql_resource", - "type": "TYPE_STRING" - }, - { - "name": "fully_qualified_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Entry", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "LookupEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.LookupEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_ListEntries_async", - "title": "DataCatalog listEntries Sample", - "origin": "API_DEFINITION", - "description": " Lists entries. Note: Currently, this method can list only custom entries. To get a list of both custom and automatically created entries, use [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].", - "canonical": true, - "file": "data_catalog.list_entries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntries", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ListEntries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1.ListEntriesResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "ListEntries", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ListEntries", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_ModifyEntryOverview_async", - "title": "DataCatalog modifyEntryOverview Sample", - "origin": "API_DEFINITION", - "description": " Modifies entry overview, part of the business context of an [Entry][google.cloud.datacatalog.v1.Entry]. To call this method, you must have the `datacatalog.entries.updateOverview` IAM permission on the corresponding project.", - "canonical": true, - "file": "data_catalog.modify_entry_overview.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ModifyEntryOverview", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ModifyEntryOverview", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "entry_overview", - "type": ".google.cloud.datacatalog.v1.EntryOverview" - } - ], - "resultType": ".google.cloud.datacatalog.v1.EntryOverview", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "ModifyEntryOverview", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ModifyEntryOverview", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_ModifyEntryContacts_async", - "title": "DataCatalog modifyEntryContacts Sample", - "origin": "API_DEFINITION", - "description": " Modifies contacts, part of the business context of an [Entry][google.cloud.datacatalog.v1.Entry]. To call this method, you must have the `datacatalog.entries.updateContacts` IAM permission on the corresponding project.", - "canonical": true, - "file": "data_catalog.modify_entry_contacts.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ModifyEntryContacts", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ModifyEntryContacts", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "contacts", - "type": ".google.cloud.datacatalog.v1.Contacts" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Contacts", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "ModifyEntryContacts", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ModifyEntryContacts", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_CreateTagTemplate_async", - "title": "DataCatalog createTagTemplate Sample", - "origin": "API_DEFINITION", - "description": " Creates a tag template. You must enable the Data Catalog API in the project identified by the `parent` parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.create_tag_template.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTagTemplate", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tag_template_id", - "type": "TYPE_STRING" - }, - { - "name": "tag_template", - "type": ".google.cloud.datacatalog.v1.TagTemplate" - } - ], - "resultType": ".google.cloud.datacatalog.v1.TagTemplate", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "CreateTagTemplate", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_GetTagTemplate_async", - "title": "DataCatalog getTagTemplate Sample", - "origin": "API_DEFINITION", - "description": " Gets a tag template.", - "canonical": true, - "file": "data_catalog.get_tag_template.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTagTemplate", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.TagTemplate", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "GetTagTemplate", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_UpdateTagTemplate_async", - "title": "DataCatalog updateTagTemplate Sample", - "origin": "API_DEFINITION", - "description": " Updates a tag template. You can't update template fields with this method. These fields are separate resources with their own create, update, and delete methods. You must enable the Data Catalog API in the project identified by the `tag_template.name` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.update_tag_template.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTagTemplate", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate", - "async": true, - "parameters": [ - { - "name": "tag_template", - "type": ".google.cloud.datacatalog.v1.TagTemplate" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1.TagTemplate", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateTagTemplate", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_DeleteTagTemplate_async", - "title": "DataCatalog deleteTagTemplate Sample", - "origin": "API_DEFINITION", - "description": " Deletes a tag template and all tags that use it. You must enable the Data Catalog API in the project identified by the `name` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.delete_tag_template.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTagTemplate", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteTagTemplate", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_CreateTagTemplateField_async", - "title": "DataCatalog createTagTemplateField Sample", - "origin": "API_DEFINITION", - "description": " Creates a field in a tag template. You must enable the Data Catalog API in the project identified by the `parent` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.create_tag_template_field.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTagTemplateField", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tag_template_field_id", - "type": "TYPE_STRING" - }, - { - "name": "tag_template_field", - "type": ".google.cloud.datacatalog.v1.TagTemplateField" - } - ], - "resultType": ".google.cloud.datacatalog.v1.TagTemplateField", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "CreateTagTemplateField", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_UpdateTagTemplateField_async", - "title": "DataCatalog updateTagTemplateField Sample", - "origin": "API_DEFINITION", - "description": " Updates a field in a tag template. You can't update the field type with this method. You must enable the Data Catalog API in the project identified by the `name` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.update_tag_template_field.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTagTemplateField", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "tag_template_field", - "type": ".google.cloud.datacatalog.v1.TagTemplateField" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1.TagTemplateField", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateTagTemplateField", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_RenameTagTemplateField_async", - "title": "DataCatalog renameTagTemplateField Sample", - "origin": "API_DEFINITION", - "description": " Renames a field in a tag template. You must enable the Data Catalog API in the project identified by the `name` parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.rename_tag_template_field.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RenameTagTemplateField", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "new_tag_template_field_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.TagTemplateField", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "RenameTagTemplateField", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_async", - "title": "DataCatalog renameTagTemplateFieldEnumValue Sample", - "origin": "API_DEFINITION", - "description": " Renames an enum value in a tag template. Within a single enum field, enum values must be unique.", - "canonical": true, - "file": "data_catalog.rename_tag_template_field_enum_value.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RenameTagTemplateFieldEnumValue", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "new_enum_value_display_name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.TagTemplateField", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "RenameTagTemplateFieldEnumValue", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_DeleteTagTemplateField_async", - "title": "DataCatalog deleteTagTemplateField Sample", - "origin": "API_DEFINITION", - "description": " Deletes a field in a tag template and all uses of this field from the tags based on this template. You must enable the Data Catalog API in the project identified by the `name` parameter. For more information, see [Data Catalog resource project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).", - "canonical": true, - "file": "data_catalog.delete_tag_template_field.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTagTemplateField", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteTagTemplateField", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_CreateTag_async", - "title": "DataCatalog createTag Sample", - "origin": "API_DEFINITION", - "description": " Creates a tag and assigns it to: * An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is `projects.locations.entryGroups.entries.tags.create`. * Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method name is `projects.locations.entryGroups.tags.create`. Note: The project identified by the `parent` parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization.", - "canonical": true, - "file": "data_catalog.create_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTag", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateTag", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tag", - "type": ".google.cloud.datacatalog.v1.Tag" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Tag", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "CreateTag", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.CreateTag", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_UpdateTag_async", - "title": "DataCatalog updateTag Sample", - "origin": "API_DEFINITION", - "description": " Updates an existing tag.", - "canonical": true, - "file": "data_catalog.update_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTag", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateTag", - "async": true, - "parameters": [ - { - "name": "tag", - "type": ".google.cloud.datacatalog.v1.Tag" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Tag", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateTag", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UpdateTag", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_DeleteTag_async", - "title": "DataCatalog deleteTag Sample", - "origin": "API_DEFINITION", - "description": " Deletes a tag.", - "canonical": true, - "file": "data_catalog.delete_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTag", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteTag", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteTag", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.DeleteTag", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_ListTags_async", - "title": "DataCatalog listTags Sample", - "origin": "API_DEFINITION", - "description": " Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are lowercased.", - "canonical": true, - "file": "data_catalog.list_tags.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTags", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ListTags", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.ListTagsResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "ListTags", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.ListTags", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_StarEntry_async", - "title": "DataCatalog starEntry Sample", - "origin": "API_DEFINITION", - "description": " Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by the current user. Starring information is private to each user.", - "canonical": true, - "file": "data_catalog.star_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StarEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.StarEntry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.StarEntryResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "StarEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.StarEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_UnstarEntry_async", - "title": "DataCatalog unstarEntry Sample", - "origin": "API_DEFINITION", - "description": " Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by the current user. Starring information is private to each user.", - "canonical": true, - "file": "data_catalog.unstar_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UnstarEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UnstarEntry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.UnstarEntryResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "UnstarEntry", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.UnstarEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_SetIamPolicy_async", - "title": "DataCatalog setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets an access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates - Entry groups Note: This method sets policies only within Data Catalog and can't be used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources synced with the Data Catalog. To call this method, you must have the following Google IAM permissions: - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.", - "canonical": true, - "file": "data_catalog.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.SetIamPolicy", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_GetIamPolicy_async", - "title": "DataCatalog getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for a resource. May return: * A`NOT_FOUND` error if the resource doesn't exist or you don't have the permission to view it. * An empty policy if the resource exists but doesn't have a set policy. Supported resources are: - Tag templates - Entry groups Note: This method doesn't get policies from Google Cloud Platform resources ingested into Data Catalog. To call this method, you must have the following Google IAM permissions: - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.", - "canonical": true, - "file": "data_catalog.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.GetIamPolicy", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_DataCatalog_TestIamPermissions_async", - "title": "DataCatalog testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Gets your permissions on a resource. Returns an empty set of permissions if the resource doesn't exist. Supported resources are: - Tag templates - Entry groups Note: This method gets policies only within Data Catalog and can't be used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources ingested into Data Catalog. No Google IAM permissions are required to call this method.", - "canonical": true, - "file": "data_catalog.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1.DataCatalogClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.datacatalog.v1.DataCatalog.TestIamPermissions", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_CreateTaxonomy_async", - "title": "DataCatalog createTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Creates a taxonomy in a specified project. The taxonomy is initially empty, that is, it doesn't contain policy tags.", - "canonical": true, - "file": "policy_tag_manager.create_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.CreateTaxonomy", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "taxonomy", - "type": ".google.cloud.datacatalog.v1.Taxonomy" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Taxonomy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "CreateTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.CreateTaxonomy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_DeleteTaxonomy_async", - "title": "DataCatalog deleteTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Deletes a taxonomy, including all policy tags in this taxonomy, their associated policies, and the policy tags references from BigQuery columns.", - "canonical": true, - "file": "policy_tag_manager.delete_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.DeleteTaxonomy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "DeleteTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.DeleteTaxonomy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_UpdateTaxonomy_async", - "title": "DataCatalog updateTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Updates a taxonomy, including its display name, description, and activated policy types.", - "canonical": true, - "file": "policy_tag_manager.update_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.UpdateTaxonomy", - "async": true, - "parameters": [ - { - "name": "taxonomy", - "type": ".google.cloud.datacatalog.v1.Taxonomy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Taxonomy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "UpdateTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.UpdateTaxonomy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_ListTaxonomies_async", - "title": "DataCatalog listTaxonomies Sample", - "origin": "API_DEFINITION", - "description": " Lists all taxonomies in a project in a particular location that you have a permission to view.", - "canonical": true, - "file": "policy_tag_manager.list_taxonomies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTaxonomies", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.ListTaxonomiesResponse", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "ListTaxonomies", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.ListTaxonomies", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_GetTaxonomy_async", - "title": "DataCatalog getTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Gets a taxonomy.", - "canonical": true, - "file": "policy_tag_manager.get_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.GetTaxonomy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Taxonomy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "GetTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.GetTaxonomy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_CreatePolicyTag_async", - "title": "DataCatalog createPolicyTag Sample", - "origin": "API_DEFINITION", - "description": " Creates a policy tag in a taxonomy.", - "canonical": true, - "file": "policy_tag_manager.create_policy_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePolicyTag", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.CreatePolicyTag", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "policy_tag", - "type": ".google.cloud.datacatalog.v1.PolicyTag" - } - ], - "resultType": ".google.cloud.datacatalog.v1.PolicyTag", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "CreatePolicyTag", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.CreatePolicyTag", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_DeletePolicyTag_async", - "title": "DataCatalog deletePolicyTag Sample", - "origin": "API_DEFINITION", - "description": " Deletes a policy tag together with the following: * All of its descendant policy tags, if any * Policies associated with the policy tag and its descendants * References from BigQuery table schema of the policy tag and its descendants", - "canonical": true, - "file": "policy_tag_manager.delete_policy_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePolicyTag", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.DeletePolicyTag", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "DeletePolicyTag", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.DeletePolicyTag", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_UpdatePolicyTag_async", - "title": "DataCatalog updatePolicyTag Sample", - "origin": "API_DEFINITION", - "description": " Updates a policy tag, including its display name, description, and parent policy tag.", - "canonical": true, - "file": "policy_tag_manager.update_policy_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdatePolicyTag", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.UpdatePolicyTag", - "async": true, - "parameters": [ - { - "name": "policy_tag", - "type": ".google.cloud.datacatalog.v1.PolicyTag" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1.PolicyTag", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "UpdatePolicyTag", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.UpdatePolicyTag", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_ListPolicyTags_async", - "title": "DataCatalog listPolicyTags Sample", - "origin": "API_DEFINITION", - "description": " Lists all policy tags in a taxonomy.", - "canonical": true, - "file": "policy_tag_manager.list_policy_tags.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPolicyTags", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.ListPolicyTagsResponse", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "ListPolicyTags", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.ListPolicyTags", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_GetPolicyTag_async", - "title": "DataCatalog getPolicyTag Sample", - "origin": "API_DEFINITION", - "description": " Gets a policy tag.", - "canonical": true, - "file": "policy_tag_manager.get_policy_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPolicyTag", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.GetPolicyTag", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1.PolicyTag", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "GetPolicyTag", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.GetPolicyTag", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_GetIamPolicy_async", - "title": "DataCatalog getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the IAM policy for a policy tag or a taxonomy.", - "canonical": true, - "file": "policy_tag_manager.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.GetIamPolicy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_SetIamPolicy_async", - "title": "DataCatalog setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the IAM policy for a policy tag or a taxonomy.", - "canonical": true, - "file": "policy_tag_manager.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.SetIamPolicy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManager_TestIamPermissions_async", - "title": "DataCatalog testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns your permissions on a specified policy tag or taxonomy.", - "canonical": true, - "file": "policy_tag_manager.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager.TestIamPermissions", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManagerSerialization_ReplaceTaxonomy_async", - "title": "DataCatalog replaceTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Replaces (updates) a taxonomy and all its policy tags. The taxonomy and its entire hierarchy of policy tags must be represented literally by `SerializedTaxonomy` and the nested `SerializedPolicyTag` messages. This operation automatically does the following: - Deletes the existing policy tags that are missing from the `SerializedPolicyTag`. - Creates policy tags that don't have resource names. They are considered new. - Updates policy tags with valid resources names accordingly.", - "canonical": true, - "file": "policy_tag_manager_serialization.replace_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReplaceTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ReplaceTaxonomy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "serialized_taxonomy", - "type": ".google.cloud.datacatalog.v1.SerializedTaxonomy" - } - ], - "resultType": ".google.cloud.datacatalog.v1.Taxonomy", - "client": { - "shortName": "PolicyTagManagerSerializationClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerializationClient" - }, - "method": { - "shortName": "ReplaceTaxonomy", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ReplaceTaxonomy", - "service": { - "shortName": "PolicyTagManagerSerialization", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerialization" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManagerSerialization_ImportTaxonomies_async", - "title": "DataCatalog importTaxonomies Sample", - "origin": "API_DEFINITION", - "description": " Creates new taxonomies (including their policy tags) in a given project by importing from inlined or cross-regional sources. For a cross-regional source, new taxonomies are created by copying from a source in another region. For an inlined source, taxonomies and policy tags are created in bulk using nested protocol buffer structures.", - "canonical": true, - "file": "policy_tag_manager_serialization.import_taxonomies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportTaxonomies", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "inline_source", - "type": ".google.cloud.datacatalog.v1.InlineSource" - }, - { - "name": "cross_regional_source", - "type": ".google.cloud.datacatalog.v1.CrossRegionalSource" - } - ], - "resultType": ".google.cloud.datacatalog.v1.ImportTaxonomiesResponse", - "client": { - "shortName": "PolicyTagManagerSerializationClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerializationClient" - }, - "method": { - "shortName": "ImportTaxonomies", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ImportTaxonomies", - "service": { - "shortName": "PolicyTagManagerSerialization", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerialization" - } - } - } - }, - { - "regionTag": "datacatalog_v1_generated_PolicyTagManagerSerialization_ExportTaxonomies_async", - "title": "DataCatalog exportTaxonomies Sample", - "origin": "API_DEFINITION", - "description": " Exports taxonomies in the requested type and returns them, including their policy tags. The requested taxonomies must belong to the same project. This method generates `SerializedTaxonomy` protocol buffers with nested policy tags that can be used as input for `ImportTaxonomies` calls.", - "canonical": true, - "file": "policy_tag_manager_serialization.export_taxonomies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportTaxonomies", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "taxonomies", - "type": "TYPE_STRING[]" - }, - { - "name": "serialized_taxonomies", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.datacatalog.v1.ExportTaxonomiesResponse", - "client": { - "shortName": "PolicyTagManagerSerializationClient", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerializationClient" - }, - "method": { - "shortName": "ExportTaxonomies", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerialization.ExportTaxonomies", - "service": { - "shortName": "PolicyTagManagerSerialization", - "fullName": "google.cloud.datacatalog.v1.PolicyTagManagerSerialization" - } - } - } - } - ] -} \ No newline at end of file diff --git a/samples/generated/v1beta1/data_catalog.create_entry.js b/samples/generated/v1beta1/data_catalog.create_entry.js deleted file mode 100644 index d1b990e9..00000000 --- a/samples/generated/v1beta1/data_catalog.create_entry.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, entryId, entry) { - // [START datacatalog_v1beta1_generated_DataCatalog_CreateEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry group this entry is in. Example: - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * Note that this Entry and its child resources may not actually be stored in - * the location in this name. - */ - // const parent = 'abc123' - /** - * Required. The id of the entry to create. - */ - // const entryId = 'abc123' - /** - * Required. The entry to create. - */ - // const entry = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateEntry() { - // Construct request - const request = { - parent, - entryId, - entry, - }; - - // Run request - const response = await datacatalogClient.createEntry(request); - console.log(response); - } - - callCreateEntry(); - // [END datacatalog_v1beta1_generated_DataCatalog_CreateEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.create_entry_group.js b/samples/generated/v1beta1/data_catalog.create_entry_group.js deleted file mode 100644 index de69b091..00000000 --- a/samples/generated/v1beta1/data_catalog.create_entry_group.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, entryGroupId) { - // [START datacatalog_v1beta1_generated_DataCatalog_CreateEntryGroup_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the project this entry group is in. Example: - * * projects/{project_id}/locations/{location} - * Note that this EntryGroup and its child resources may not actually be - * stored in the location in this name. - */ - // const parent = 'abc123' - /** - * Required. The id of the entry group to create. - * The id must begin with a letter or underscore, contain only English - * letters, numbers and underscores, and be at most 64 characters. - */ - // const entryGroupId = 'abc123' - /** - * The entry group to create. Defaults to an empty entry group. - */ - // const entryGroup = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateEntryGroup() { - // Construct request - const request = { - parent, - entryGroupId, - }; - - // Run request - const response = await datacatalogClient.createEntryGroup(request); - console.log(response); - } - - callCreateEntryGroup(); - // [END datacatalog_v1beta1_generated_DataCatalog_CreateEntryGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.create_tag.js b/samples/generated/v1beta1/data_catalog.create_tag.js deleted file mode 100644 index 9626a560..00000000 --- a/samples/generated/v1beta1/data_catalog.create_tag.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, tag) { - // [START datacatalog_v1beta1_generated_DataCatalog_CreateTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the resource to attach this tag to. Tags can be attached to - * Entries. Example: - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * Note that this Tag and its child resources may not actually be stored in - * the location in this name. - */ - // const parent = 'abc123' - /** - * Required. The tag to create. - */ - // const tag = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateTag() { - // Construct request - const request = { - parent, - tag, - }; - - // Run request - const response = await datacatalogClient.createTag(request); - console.log(response); - } - - callCreateTag(); - // [END datacatalog_v1beta1_generated_DataCatalog_CreateTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.create_tag_template.js b/samples/generated/v1beta1/data_catalog.create_tag_template.js deleted file mode 100644 index 0da71921..00000000 --- a/samples/generated/v1beta1/data_catalog.create_tag_template.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, tagTemplateId, tagTemplate) { - // [START datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplate_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the project and the template location - * region (https://cloud.google.com/data-catalog/docs/concepts/regions. - * Example: - * * projects/{project_id}/locations/us-central1 - */ - // const parent = 'abc123' - /** - * Required. The id of the tag template to create. - */ - // const tagTemplateId = 'abc123' - /** - * Required. The tag template to create. - */ - // const tagTemplate = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateTagTemplate() { - // Construct request - const request = { - parent, - tagTemplateId, - tagTemplate, - }; - - // Run request - const response = await datacatalogClient.createTagTemplate(request); - console.log(response); - } - - callCreateTagTemplate(); - // [END datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.create_tag_template_field.js b/samples/generated/v1beta1/data_catalog.create_tag_template_field.js deleted file mode 100644 index c2794160..00000000 --- a/samples/generated/v1beta1/data_catalog.create_tag_template_field.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, tagTemplateFieldId, tagTemplateField) { - // [START datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplateField_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the project and the template location - * region (https://cloud.google.com/data-catalog/docs/concepts/regions). - * Example: - * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} - */ - // const parent = 'abc123' - /** - * Required. The ID of the tag template field to create. - * Field ids can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - */ - // const tagTemplateFieldId = 'abc123' - /** - * Required. The tag template field to create. - */ - // const tagTemplateField = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callCreateTagTemplateField() { - // Construct request - const request = { - parent, - tagTemplateFieldId, - tagTemplateField, - }; - - // Run request - const response = await datacatalogClient.createTagTemplateField(request); - console.log(response); - } - - callCreateTagTemplateField(); - // [END datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplateField_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.delete_entry.js b/samples/generated/v1beta1/data_catalog.delete_entry.js deleted file mode 100644 index e7df00bf..00000000 --- a/samples/generated/v1beta1/data_catalog.delete_entry.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_DeleteEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry. Example: - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteEntry() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deleteEntry(request); - console.log(response); - } - - callDeleteEntry(); - // [END datacatalog_v1beta1_generated_DataCatalog_DeleteEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.delete_entry_group.js b/samples/generated/v1beta1/data_catalog.delete_entry_group.js deleted file mode 100644 index 4ef87dd2..00000000 --- a/samples/generated/v1beta1/data_catalog.delete_entry_group.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_DeleteEntryGroup_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry group. For example, - * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - */ - // const name = 'abc123' - /** - * Optional. If true, deletes all entries in the entry group. - */ - // const force = true - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteEntryGroup() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deleteEntryGroup(request); - console.log(response); - } - - callDeleteEntryGroup(); - // [END datacatalog_v1beta1_generated_DataCatalog_DeleteEntryGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.delete_tag.js b/samples/generated/v1beta1/data_catalog.delete_tag.js deleted file mode 100644 index aa4cda31..00000000 --- a/samples/generated/v1beta1/data_catalog.delete_tag.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_DeleteTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag to delete. Example: - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteTag() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deleteTag(request); - console.log(response); - } - - callDeleteTag(); - // [END datacatalog_v1beta1_generated_DataCatalog_DeleteTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.delete_tag_template.js b/samples/generated/v1beta1/data_catalog.delete_tag_template.js deleted file mode 100644 index 32465703..00000000 --- a/samples/generated/v1beta1/data_catalog.delete_tag_template.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, force) { - // [START datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplate_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template to delete. Example: - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - */ - // const name = 'abc123' - /** - * Required. Currently, this field must always be set to `true`. - * This confirms the deletion of any possible tags using this template. - * `force = false` will be supported in the future. - */ - // const force = true - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteTagTemplate() { - // Construct request - const request = { - name, - force, - }; - - // Run request - const response = await datacatalogClient.deleteTagTemplate(request); - console.log(response); - } - - callDeleteTagTemplate(); - // [END datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js b/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js deleted file mode 100644 index 6311075a..00000000 --- a/samples/generated/v1beta1/data_catalog.delete_tag_template_field.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, force) { - // [START datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplateField_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template field to delete. Example: - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - */ - // const name = 'abc123' - /** - * Required. Currently, this field must always be set to `true`. - * This confirms the deletion of this field from any tags using this field. - * `force = false` will be supported in the future. - */ - // const force = true - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callDeleteTagTemplateField() { - // Construct request - const request = { - name, - force, - }; - - // Run request - const response = await datacatalogClient.deleteTagTemplateField(request); - console.log(response); - } - - callDeleteTagTemplateField(); - // [END datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplateField_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.get_entry.js b/samples/generated/v1beta1/data_catalog.get_entry.js deleted file mode 100644 index 4b8e4e80..00000000 --- a/samples/generated/v1beta1/data_catalog.get_entry.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_GetEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry. Example: - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callGetEntry() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getEntry(request); - console.log(response); - } - - callGetEntry(); - // [END datacatalog_v1beta1_generated_DataCatalog_GetEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.get_entry_group.js b/samples/generated/v1beta1/data_catalog.get_entry_group.js deleted file mode 100644 index 8602f8f9..00000000 --- a/samples/generated/v1beta1/data_catalog.get_entry_group.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_GetEntryGroup_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry group. For example, - * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - */ - // const name = 'abc123' - /** - * The fields to return. If not set or empty, all fields are returned. - */ - // const readMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callGetEntryGroup() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getEntryGroup(request); - console.log(response); - } - - callGetEntryGroup(); - // [END datacatalog_v1beta1_generated_DataCatalog_GetEntryGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.get_iam_policy.js b/samples/generated/v1beta1/data_catalog.get_iam_policy.js deleted file mode 100644 index 6ff2db95..00000000 --- a/samples/generated/v1beta1/data_catalog.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource) { - // [START datacatalog_v1beta1_generated_DataCatalog_GetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - */ - // const options = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callGetIamPolicy() { - // Construct request - const request = { - resource, - }; - - // Run request - const response = await datacatalogClient.getIamPolicy(request); - console.log(response); - } - - callGetIamPolicy(); - // [END datacatalog_v1beta1_generated_DataCatalog_GetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.get_tag_template.js b/samples/generated/v1beta1/data_catalog.get_tag_template.js deleted file mode 100644 index 94008556..00000000 --- a/samples/generated/v1beta1/data_catalog.get_tag_template.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_GetTagTemplate_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template. Example: - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callGetTagTemplate() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getTagTemplate(request); - console.log(response); - } - - callGetTagTemplate(); - // [END datacatalog_v1beta1_generated_DataCatalog_GetTagTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.list_entries.js b/samples/generated/v1beta1/data_catalog.list_entries.js deleted file mode 100644 index d8b7d479..00000000 --- a/samples/generated/v1beta1/data_catalog.list_entries.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_ListEntries_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the entry group that contains the entries, which can - * be provided in URL format. Example: - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. Default is 10. Max limit is 1000. - * Throws an invalid argument for `page_size > 1000`. - */ - // const pageSize = 1234 - /** - * Token that specifies which page is requested. If empty, the first page is - * returned. - */ - // const pageToken = 'abc123' - /** - * The fields to return for each Entry. If not set or empty, all - * fields are returned. - * For example, setting read_mask to contain only one path "name" will cause - * ListEntries to return a list of Entries with only "name" field. - */ - // const readMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callListEntries() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listEntriesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntries(); - // [END datacatalog_v1beta1_generated_DataCatalog_ListEntries_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.list_entry_groups.js b/samples/generated/v1beta1/data_catalog.list_entry_groups.js deleted file mode 100644 index e87f3017..00000000 --- a/samples/generated/v1beta1/data_catalog.list_entry_groups.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_ListEntryGroups_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the location that contains the entry groups, which can be - * provided in URL format. Example: - * * projects/{project_id}/locations/{location} - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of items to return. Default is 10. Max limit is 1000. - * Throws an invalid argument for `page_size > 1000`. - */ - // const pageSize = 1234 - /** - * Optional. Token that specifies which page is requested. If empty, the first page is - * returned. - */ - // const pageToken = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callListEntryGroups() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listEntryGroupsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEntryGroups(); - // [END datacatalog_v1beta1_generated_DataCatalog_ListEntryGroups_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.list_tags.js b/samples/generated/v1beta1/data_catalog.list_tags.js deleted file mode 100644 index d3d1801c..00000000 --- a/samples/generated/v1beta1/data_catalog.list_tags.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_ListTags_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the Data Catalog resource to list the tags of. The resource - * could be an Entry google.cloud.datacatalog.v1beta1.Entry or an - * EntryGroup google.cloud.datacatalog.v1beta1.EntryGroup. - * Examples: - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - */ - // const parent = 'abc123' - /** - * The maximum number of tags to return. Default is 10. Max limit is 1000. - */ - // const pageSize = 1234 - /** - * Token that specifies which page is requested. If empty, the first page is - * returned. - */ - // const pageToken = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callListTags() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listTagsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTags(); - // [END datacatalog_v1beta1_generated_DataCatalog_ListTags_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.lookup_entry.js b/samples/generated/v1beta1/data_catalog.lookup_entry.js deleted file mode 100644 index 3b2d6dc7..00000000 --- a/samples/generated/v1beta1/data_catalog.lookup_entry.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_DataCatalog_LookupEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 full name of the Google Cloud Platform resource the Data Catalog - * entry represents. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name. - * Full names are case-sensitive. - * Examples: - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * * //pubsub.googleapis.com/projects/projectId/topics/topicId - */ - // const linkedResource = 'abc123' - /** - * The SQL name of the entry. SQL names are case-sensitive. - * Examples: - * * `pubsub.project_id.topic_id` - * * ``pubsub.project_id.`topic.id.with.dots` `` - * * `bigquery.table.project_id.dataset_id.table_id` - * * `bigquery.dataset.project_id.dataset_id` - * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * `*_id`s shoud satisfy the standard SQL rules for identifiers. - * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. - */ - // const sqlResource = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callLookupEntry() { - // Construct request - const request = { - }; - - // Run request - const response = await datacatalogClient.lookupEntry(request); - console.log(response); - } - - callLookupEntry(); - // [END datacatalog_v1beta1_generated_DataCatalog_LookupEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js b/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js deleted file mode 100644 index 74b2856d..00000000 --- a/samples/generated/v1beta1/data_catalog.rename_tag_template_field.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, newTagTemplateFieldId) { - // [START datacatalog_v1beta1_generated_DataCatalog_RenameTagTemplateField_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template. Example: - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - */ - // const name = 'abc123' - /** - * Required. The new ID of this tag template field. For example, `my_new_field`. - */ - // const newTagTemplateFieldId = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callRenameTagTemplateField() { - // Construct request - const request = { - name, - newTagTemplateFieldId, - }; - - // Run request - const response = await datacatalogClient.renameTagTemplateField(request); - console.log(response); - } - - callRenameTagTemplateField(); - // [END datacatalog_v1beta1_generated_DataCatalog_RenameTagTemplateField_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.search_catalog.js b/samples/generated/v1beta1/data_catalog.search_catalog.js deleted file mode 100644 index f25324d0..00000000 --- a/samples/generated/v1beta1/data_catalog.search_catalog.js +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(scope, query) { - // [START datacatalog_v1beta1_generated_DataCatalog_SearchCatalog_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 scope of this search request. A `scope` that has empty - * `include_org_ids`, `include_project_ids` AND false - * `include_gcp_public_datasets` is considered invalid. Data Catalog will - * return an error in such a case. - */ - // const scope = {} - /** - * Required. The query string in search query syntax. The query must be non-empty. - * Query strings can be simple as "x" or more qualified as: - * * name:x - * * column:x - * * description:y - * Note: Query tokens need to have a minimum of 3 characters for substring - * matching to work correctly. See Data Catalog Search - * Syntax (https://cloud.google.com/data-catalog/docs/how-to/search-reference) - * for more information. - */ - // const query = 'abc123' - /** - * Number of results in the search page. If <=0 then defaults to 10. Max limit - * for page_size is 1000. Throws an invalid argument for page_size > 1000. - */ - // const pageSize = 1234 - /** - * Optional. Pagination token returned in an earlier - * SearchCatalogResponse.next_page_token google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token, which - * indicates that this is a continuation of a prior - * SearchCatalogRequest google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog - * call, and that the system should return the next page of data. If empty, - * the first page is returned. - */ - // const pageToken = 'abc123' - /** - * Specifies the ordering of results, currently supported case-sensitive - * choices are: - * * `relevance`, only supports descending - * * `last_modified_timestamp asc|desc`, defaults to descending if not - * specified - * If not specified, defaults to `relevance` descending. - */ - // const orderBy = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callSearchCatalog() { - // Construct request - const request = { - scope, - query, - }; - - // Run request - const iterable = await datacatalogClient.searchCatalogAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callSearchCatalog(); - // [END datacatalog_v1beta1_generated_DataCatalog_SearchCatalog_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.set_iam_policy.js b/samples/generated/v1beta1/data_catalog.set_iam_policy.js deleted file mode 100644 index 0a6a8bac..00000000 --- a/samples/generated/v1beta1/data_catalog.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, policy) { - // [START datacatalog_v1beta1_generated_DataCatalog_SetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - */ - // const policy = {} - /** - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * `paths: "bindings, etag"` - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callSetIamPolicy() { - // Construct request - const request = { - resource, - policy, - }; - - // Run request - const response = await datacatalogClient.setIamPolicy(request); - console.log(response); - } - - callSetIamPolicy(); - // [END datacatalog_v1beta1_generated_DataCatalog_SetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.test_iam_permissions.js b/samples/generated/v1beta1/data_catalog.test_iam_permissions.js deleted file mode 100644 index f6aa540f..00000000 --- a/samples/generated/v1beta1/data_catalog.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, permissions) { - // [START datacatalog_v1beta1_generated_DataCatalog_TestIamPermissions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). - */ - // const permissions = 'abc123' - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callTestIamPermissions() { - // Construct request - const request = { - resource, - permissions, - }; - - // Run request - const response = await datacatalogClient.testIamPermissions(request); - console.log(response); - } - - callTestIamPermissions(); - // [END datacatalog_v1beta1_generated_DataCatalog_TestIamPermissions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.update_entry.js b/samples/generated/v1beta1/data_catalog.update_entry.js deleted file mode 100644 index 61f6d74e..00000000 --- a/samples/generated/v1beta1/data_catalog.update_entry.js +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entry) { - // [START datacatalog_v1beta1_generated_DataCatalog_UpdateEntry_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 updated entry. The "name" field must be set. - */ - // const entry = {} - /** - * The fields to update on the entry. If absent or empty, all modifiable - * fields are updated. - * The following fields are modifiable: - * * For entries with type `DATA_STREAM`: - * * `schema` - * * For entries with type `FILESET` - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * * For entries with `user_specified_type` - * * `schema` - * * `display_name` - * * `description` - * * user_specified_type - * * user_specified_system - * * linked_resource - * * source_system_timestamps - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateEntry() { - // Construct request - const request = { - entry, - }; - - // Run request - const response = await datacatalogClient.updateEntry(request); - console.log(response); - } - - callUpdateEntry(); - // [END datacatalog_v1beta1_generated_DataCatalog_UpdateEntry_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.update_entry_group.js b/samples/generated/v1beta1/data_catalog.update_entry_group.js deleted file mode 100644 index 6ddf30e1..00000000 --- a/samples/generated/v1beta1/data_catalog.update_entry_group.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(entryGroup) { - // [START datacatalog_v1beta1_generated_DataCatalog_UpdateEntryGroup_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 updated entry group. "name" field must be set. - */ - // const entryGroup = {} - /** - * The fields to update on the entry group. If absent or empty, all modifiable - * fields are updated. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateEntryGroup() { - // Construct request - const request = { - entryGroup, - }; - - // Run request - const response = await datacatalogClient.updateEntryGroup(request); - console.log(response); - } - - callUpdateEntryGroup(); - // [END datacatalog_v1beta1_generated_DataCatalog_UpdateEntryGroup_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.update_tag.js b/samples/generated/v1beta1/data_catalog.update_tag.js deleted file mode 100644 index aa65f9ef..00000000 --- a/samples/generated/v1beta1/data_catalog.update_tag.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tag) { - // [START datacatalog_v1beta1_generated_DataCatalog_UpdateTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 updated tag. The "name" field must be set. - */ - // const tag = {} - /** - * The fields to update on the Tag. If absent or empty, all modifiable fields - * are updated. Currently the only modifiable field is the field `fields`. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateTag() { - // Construct request - const request = { - tag, - }; - - // Run request - const response = await datacatalogClient.updateTag(request); - console.log(response); - } - - callUpdateTag(); - // [END datacatalog_v1beta1_generated_DataCatalog_UpdateTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.update_tag_template.js b/samples/generated/v1beta1/data_catalog.update_tag_template.js deleted file mode 100644 index 44901201..00000000 --- a/samples/generated/v1beta1/data_catalog.update_tag_template.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(tagTemplate) { - // [START datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplate_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 template to update. The "name" field must be set. - */ - // const tagTemplate = {} - /** - * The field mask specifies the parts of the template to overwrite. - * Allowed fields: - * * `display_name` - * If absent or empty, all of the allowed fields above will be updated. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateTagTemplate() { - // Construct request - const request = { - tagTemplate, - }; - - // Run request - const response = await datacatalogClient.updateTagTemplate(request); - console.log(response); - } - - callUpdateTagTemplate(); - // [END datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplate_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/data_catalog.update_tag_template_field.js b/samples/generated/v1beta1/data_catalog.update_tag_template_field.js deleted file mode 100644 index 9909486e..00000000 --- a/samples/generated/v1beta1/data_catalog.update_tag_template_field.js +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, tagTemplateField) { - // [START datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplateField_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the tag template field. Example: - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - */ - // const name = 'abc123' - /** - * Required. The template to update. - */ - // const tagTemplateField = {} - /** - * Optional. The field mask specifies the parts of the template to be updated. - * Allowed fields: - * * `display_name` - * * `type.enum_type` - * * `is_required` - * If `update_mask` is not set or empty, all of the allowed fields above will - * be updated. - * When updating an enum type, the provided values will be merged with the - * existing values. Therefore, enum values can only be added, existing enum - * values cannot be deleted nor renamed. Updating a template field from - * optional to required is NOT allowed. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new DataCatalogClient(); - - async function callUpdateTagTemplateField() { - // Construct request - const request = { - name, - tagTemplateField, - }; - - // Run request - const response = await datacatalogClient.updateTagTemplateField(request); - console.log(response); - } - - callUpdateTagTemplateField(); - // [END datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplateField_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js b/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js deleted file mode 100644 index feeab8f1..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_CreatePolicyTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the taxonomy that the policy tag will belong to. - */ - // const parent = 'abc123' - /** - * The policy tag to be created. - */ - // const policyTag = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callCreatePolicyTag() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await datacatalogClient.createPolicyTag(request); - console.log(response); - } - - callCreatePolicyTag(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_CreatePolicyTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js b/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js deleted file mode 100644 index 82cef9b9..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_CreateTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the project that the taxonomy will belong to. - */ - // const parent = 'abc123' - /** - * The taxonomy to be created. - */ - // const taxonomy = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callCreateTaxonomy() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await datacatalogClient.createTaxonomy(request); - console.log(response); - } - - callCreateTaxonomy(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_CreateTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js b/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js deleted file mode 100644 index 7e48c640..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_DeletePolicyTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the policy tag to be deleted. All of its descendant - * policy tags will also be deleted. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callDeletePolicyTag() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deletePolicyTag(request); - console.log(response); - } - - callDeletePolicyTag(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_DeletePolicyTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js b/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js deleted file mode 100644 index 3b5493ce..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_DeleteTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the taxonomy to be deleted. All policy tags in - * this taxonomy will also be deleted. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callDeleteTaxonomy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.deleteTaxonomy(request); - console.log(response); - } - - callDeleteTaxonomy(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_DeleteTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js b/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js deleted file mode 100644 index 31e02bd8..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource) { - // [START datacatalog_v1beta1_generated_PolicyTagManager_GetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - */ - // const options = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callGetIamPolicy() { - // Construct request - const request = { - resource, - }; - - // Run request - const response = await datacatalogClient.getIamPolicy(request); - console.log(response); - } - - callGetIamPolicy(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_GetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js b/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js deleted file mode 100644 index 23908065..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_GetPolicyTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the requested policy tag. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callGetPolicyTag() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getPolicyTag(request); - console.log(response); - } - - callGetPolicyTag(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_GetPolicyTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js b/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js deleted file mode 100644 index 56958ec9..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_GetTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the requested taxonomy. - */ - // const name = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callGetTaxonomy() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await datacatalogClient.getTaxonomy(request); - console.log(response); - } - - callGetTaxonomy(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_GetTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js b/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js deleted file mode 100644 index eeca142b..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_ListPolicyTags_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the taxonomy to list the policy tags of. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. Must be a value between 1 and 1000. - * If not set, defaults to 50. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous List request, if any. If - * not set, defaults to an empty string. - */ - // const pageToken = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callListPolicyTags() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listPolicyTagsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListPolicyTags(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_ListPolicyTags_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js b/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js deleted file mode 100644 index 2b6feb9b..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_ListTaxonomies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the project to list the taxonomies of. - */ - // const parent = 'abc123' - /** - * The maximum number of items to return. Must be a value between 1 and 1000. - * If not set, defaults to 50. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous list request, if any. If - * not set, defaults to an empty string. - */ - // const pageToken = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callListTaxonomies() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = await datacatalogClient.listTaxonomiesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListTaxonomies(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_ListTaxonomies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js b/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js deleted file mode 100644 index bbdc2596..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, policy) { - // [START datacatalog_v1beta1_generated_PolicyTagManager_SetIamPolicy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - */ - // const policy = {} - /** - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * `paths: "bindings, etag"` - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callSetIamPolicy() { - // Construct request - const request = { - resource, - policy, - }; - - // Run request - const response = await datacatalogClient.setIamPolicy(request); - console.log(response); - } - - callSetIamPolicy(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_SetIamPolicy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js b/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js deleted file mode 100644 index 547a15fa..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(resource, permissions) { - // [START datacatalog_v1beta1_generated_PolicyTagManager_TestIamPermissions_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - */ - // const resource = 'abc123' - /** - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). - */ - // const permissions = 'abc123' - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callTestIamPermissions() { - // Construct request - const request = { - resource, - permissions, - }; - - // Run request - const response = await datacatalogClient.testIamPermissions(request); - console.log(response); - } - - callTestIamPermissions(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_TestIamPermissions_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js b/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js deleted file mode 100644 index 85d7aedc..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_UpdatePolicyTag_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 policy tag to update. Only the description, display_name, and - * parent_policy_tag fields can be updated. - */ - // const policyTag = {} - /** - * The update mask applies to the resource. Only display_name, description and - * parent_policy_tag can be updated and thus can be listed in the mask. If - * update_mask is not provided, all allowed fields (i.e. display_name, - * description and parent) will be updated. For more information including the - * `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * If not set, defaults to all of the fields that are allowed to update. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callUpdatePolicyTag() { - // Construct request - const request = { - }; - - // Run request - const response = await datacatalogClient.updatePolicyTag(request); - console.log(response); - } - - callUpdatePolicyTag(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_UpdatePolicyTag_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js b/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js deleted file mode 100644 index eb310cbb..00000000 --- a/samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManager_UpdateTaxonomy_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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 taxonomy to update. Only description, display_name, and activated - * policy types can be updated. - */ - // const taxonomy = {} - /** - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * If not set, defaults to all of the fields that are allowed to update. - */ - // const updateMask = {} - - // Imports the Datacatalog library - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerClient(); - - async function callUpdateTaxonomy() { - // Construct request - const request = { - }; - - // Run request - const response = await datacatalogClient.updateTaxonomy(request); - console.log(response); - } - - callUpdateTaxonomy(); - // [END datacatalog_v1beta1_generated_PolicyTagManager_UpdateTaxonomy_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js b/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js deleted file mode 100644 index effb399a..00000000 --- a/samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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, taxonomies) { - // [START datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ExportTaxonomies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of the project that taxonomies to be exported - * will share. - */ - // const parent = 'abc123' - /** - * Required. Resource names of the taxonomies to be exported. - */ - // const taxonomies = 'abc123' - /** - * Export taxonomies as serialized taxonomies. - */ - // const serializedTaxonomies = true - - // Imports the Datacatalog library - const {PolicyTagManagerSerializationClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerSerializationClient(); - - async function callExportTaxonomies() { - // Construct request - const request = { - parent, - taxonomies, - }; - - // Run request - const response = await datacatalogClient.exportTaxonomies(request); - console.log(response); - } - - callExportTaxonomies(); - // [END datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ExportTaxonomies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js b/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js deleted file mode 100644 index 6f9cd765..00000000 --- a/samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically 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 datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ImportTaxonomies_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It 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. Resource name of project that the newly created taxonomies will - * belong to. - */ - // const parent = 'abc123' - /** - * Inline source used for taxonomies import - */ - // const inlineSource = {} - - // Imports the Datacatalog library - const {PolicyTagManagerSerializationClient} = require('@google-cloud/datacatalog').v1beta1; - - // Instantiates a client - const datacatalogClient = new PolicyTagManagerSerializationClient(); - - async function callImportTaxonomies() { - // Construct request - const request = { - parent, - }; - - // Run request - const response = await datacatalogClient.importTaxonomies(request); - console.log(response); - } - - callImportTaxonomies(); - // [END datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ImportTaxonomies_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json b/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json deleted file mode 100644 index 24864489..00000000 --- a/samples/generated/v1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json +++ /dev/null @@ -1,1899 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-datacatalog", - "version": "3.1.1", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.datacatalog.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_SearchCatalog_async", - "title": "DataCatalog searchCatalog Sample", - "origin": "API_DEFINITION", - "description": " Searches Data Catalog for multiple resources like entries, tags that match a query. This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not return the complete resource, only the resource identifier and high level fields. Clients can subsequentally call `Get` methods. Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries. See [Data Catalog Search Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more information.", - "canonical": true, - "file": "data_catalog.search_catalog.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 94, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog", - "async": true, - "parameters": [ - { - "name": "scope", - "type": ".google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope" - }, - { - "name": "query", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "order_by", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.SearchCatalogResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "SearchCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_CreateEntryGroup_async", - "title": "DataCatalog createEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " A maximum of 10,000 entry groups may be created per organization across all locations. Users should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.create_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntryGroup", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entry_group_id", - "type": "TYPE_STRING" - }, - { - "name": "entry_group", - "type": ".google.cloud.datacatalog.v1beta1.EntryGroup" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.EntryGroup", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "CreateEntryGroup", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_UpdateEntryGroup_async", - "title": "DataCatalog updateEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by the `entry_group.name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.update_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntryGroup", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup", - "async": true, - "parameters": [ - { - "name": "entry_group", - "type": ".google.cloud.datacatalog.v1beta1.EntryGroup" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.EntryGroup", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateEntryGroup", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_GetEntryGroup_async", - "title": "DataCatalog getEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Gets an EntryGroup.", - "canonical": true, - "file": "data_catalog.get_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntryGroup", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.EntryGroup", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "GetEntryGroup", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_DeleteEntryGroup_async", - "title": "DataCatalog deleteEntryGroup Sample", - "origin": "API_DEFINITION", - "description": " Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.delete_entry_group.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntryGroup", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteEntryGroup", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_ListEntryGroups_async", - "title": "DataCatalog listEntryGroups Sample", - "origin": "API_DEFINITION", - "description": " Lists entry groups.", - "canonical": true, - "file": "data_catalog.list_entry_groups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntryGroups", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "ListEntryGroups", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_CreateEntry_async", - "title": "DataCatalog createEntry Sample", - "origin": "API_DEFINITION", - "description": " Creates an entry. Only entries of 'FILESET' type or user-specified type can be created. Users should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). A maximum of 100,000 entries may be created per entry group.", - "canonical": true, - "file": "data_catalog.create_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "entry_id", - "type": "TYPE_STRING" - }, - { - "name": "entry", - "type": ".google.cloud.datacatalog.v1beta1.Entry" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.Entry", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "CreateEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_UpdateEntry_async", - "title": "DataCatalog updateEntry Sample", - "origin": "API_DEFINITION", - "description": " Updates an existing entry. Users should enable the Data Catalog API in the project identified by the `entry.name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.update_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry", - "async": true, - "parameters": [ - { - "name": "entry", - "type": ".google.cloud.datacatalog.v1beta1.Entry" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.Entry", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_DeleteEntry_async", - "title": "DataCatalog deleteEntry Sample", - "origin": "API_DEFINITION", - "description": " Deletes an existing entry. Only entries created through [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] method can be deleted. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.delete_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_GetEntry_async", - "title": "DataCatalog getEntry Sample", - "origin": "API_DEFINITION", - "description": " Gets an entry.", - "canonical": true, - "file": "data_catalog.get_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.Entry", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "GetEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_LookupEntry_async", - "title": "DataCatalog lookupEntry Sample", - "origin": "API_DEFINITION", - "description": " Get an entry by target resource name. This method allows clients to use the resource name from the source Google Cloud Platform service to get the Data Catalog Entry.", - "canonical": true, - "file": "data_catalog.lookup_entry.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "LookupEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry", - "async": true, - "parameters": [ - { - "name": "linked_resource", - "type": "TYPE_STRING" - }, - { - "name": "sql_resource", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.Entry", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "LookupEntry", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_ListEntries_async", - "title": "DataCatalog listEntries Sample", - "origin": "API_DEFINITION", - "description": " Lists entries.", - "canonical": true, - "file": "data_catalog.list_entries.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEntries", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.ListEntriesResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "ListEntries", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplate_async", - "title": "DataCatalog createTagTemplate Sample", - "origin": "API_DEFINITION", - "description": " Creates a tag template. The user should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.create_tag_template.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTagTemplate", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tag_template_id", - "type": "TYPE_STRING" - }, - { - "name": "tag_template", - "type": ".google.cloud.datacatalog.v1beta1.TagTemplate" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.TagTemplate", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "CreateTagTemplate", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_GetTagTemplate_async", - "title": "DataCatalog getTagTemplate Sample", - "origin": "API_DEFINITION", - "description": " Gets a tag template.", - "canonical": true, - "file": "data_catalog.get_tag_template.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTagTemplate", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.TagTemplate", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "GetTagTemplate", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplate_async", - "title": "DataCatalog updateTagTemplate Sample", - "origin": "API_DEFINITION", - "description": " Updates a tag template. This method cannot be used to update the fields of a template. The tag template fields are represented as separate resources and should be updated using their own create/update/delete methods. Users should enable the Data Catalog API in the project identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.update_tag_template.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTagTemplate", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate", - "async": true, - "parameters": [ - { - "name": "tag_template", - "type": ".google.cloud.datacatalog.v1beta1.TagTemplate" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.TagTemplate", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateTagTemplate", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplate_async", - "title": "DataCatalog deleteTagTemplate Sample", - "origin": "API_DEFINITION", - "description": " Deletes a tag template and all tags using the template. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.delete_tag_template.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTagTemplate", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteTagTemplate", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplateField_async", - "title": "DataCatalog createTagTemplateField Sample", - "origin": "API_DEFINITION", - "description": " Creates a field in a tag template. The user should enable the Data Catalog API in the project identified by the `parent` parameter (see [Data Catalog Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.create_tag_template_field.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTagTemplateField", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tag_template_field_id", - "type": "TYPE_STRING" - }, - { - "name": "tag_template_field", - "type": ".google.cloud.datacatalog.v1beta1.TagTemplateField" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.TagTemplateField", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "CreateTagTemplateField", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplateField_async", - "title": "DataCatalog updateTagTemplateField Sample", - "origin": "API_DEFINITION", - "description": " Updates a field in a tag template. This method cannot be used to update the field type. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.update_tag_template_field.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTagTemplateField", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "tag_template_field", - "type": ".google.cloud.datacatalog.v1beta1.TagTemplateField" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.TagTemplateField", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateTagTemplateField", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_RenameTagTemplateField_async", - "title": "DataCatalog renameTagTemplateField Sample", - "origin": "API_DEFINITION", - "description": " Renames a field in a tag template. The user should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.rename_tag_template_field.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RenameTagTemplateField", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "new_tag_template_field_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.TagTemplateField", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "RenameTagTemplateField", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplateField_async", - "title": "DataCatalog deleteTagTemplateField Sample", - "origin": "API_DEFINITION", - "description": " Deletes a field in a tag template and all uses of that field. Users should enable the Data Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).", - "canonical": true, - "file": "data_catalog.delete_tag_template_field.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTagTemplateField", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteTagTemplateField", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_CreateTag_async", - "title": "DataCatalog createTag Sample", - "origin": "API_DEFINITION", - "description": " Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. Note: The project identified by the `parent` parameter for the [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be from the same organization.", - "canonical": true, - "file": "data_catalog.create_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTag", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "tag", - "type": ".google.cloud.datacatalog.v1beta1.Tag" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.Tag", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "CreateTag", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_UpdateTag_async", - "title": "DataCatalog updateTag Sample", - "origin": "API_DEFINITION", - "description": " Updates an existing tag.", - "canonical": true, - "file": "data_catalog.update_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTag", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag", - "async": true, - "parameters": [ - { - "name": "tag", - "type": ".google.cloud.datacatalog.v1beta1.Tag" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.Tag", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "UpdateTag", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_DeleteTag_async", - "title": "DataCatalog deleteTag Sample", - "origin": "API_DEFINITION", - "description": " Deletes a tag.", - "canonical": true, - "file": "data_catalog.delete_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTag", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "DeleteTag", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_ListTags_async", - "title": "DataCatalog listTags Sample", - "origin": "API_DEFINITION", - "description": " Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry].", - "canonical": true, - "file": "data_catalog.list_tags.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTags", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.ListTags", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.ListTagsResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "ListTags", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.ListTags", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_SetIamPolicy_async", - "title": "DataCatalog setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the access control policy for a resource. Replaces any existing policy. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.", - "canonical": true, - "file": "data_catalog.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicy", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_GetIamPolicy_async", - "title": "DataCatalog getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it. Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.", - "canonical": true, - "file": "data_catalog.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicy", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_DataCatalog_TestIamPermissions_async", - "title": "DataCatalog testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (We don't return a `NOT_FOUND` error). Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog. A caller is not required to have Google IAM permission to make this request.", - "canonical": true, - "file": "data_catalog.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "DataCatalogClient", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalogClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissions", - "service": { - "shortName": "DataCatalog", - "fullName": "google.cloud.datacatalog.v1beta1.DataCatalog" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_CreateTaxonomy_async", - "title": "DataCatalog createTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Creates a taxonomy in the specified project.", - "canonical": true, - "file": "policy_tag_manager.create_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateTaxonomy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "taxonomy", - "type": ".google.cloud.datacatalog.v1beta1.Taxonomy" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.Taxonomy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "CreateTaxonomy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_DeleteTaxonomy_async", - "title": "DataCatalog deleteTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Deletes a taxonomy. This operation will also delete all policy tags in this taxonomy along with their associated policies.", - "canonical": true, - "file": "policy_tag_manager.delete_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteTaxonomy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "DeleteTaxonomy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_UpdateTaxonomy_async", - "title": "DataCatalog updateTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Updates a taxonomy.", - "canonical": true, - "file": "policy_tag_manager.update_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateTaxonomy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy", - "async": true, - "parameters": [ - { - "name": "taxonomy", - "type": ".google.cloud.datacatalog.v1beta1.Taxonomy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.Taxonomy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "UpdateTaxonomy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_ListTaxonomies_async", - "title": "DataCatalog listTaxonomies Sample", - "origin": "API_DEFINITION", - "description": " Lists all taxonomies in a project in a particular location that the caller has permission to view.", - "canonical": true, - "file": "policy_tag_manager.list_taxonomies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListTaxonomies", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "ListTaxonomies", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_GetTaxonomy_async", - "title": "DataCatalog getTaxonomy Sample", - "origin": "API_DEFINITION", - "description": " Gets a taxonomy.", - "canonical": true, - "file": "policy_tag_manager.get_taxonomy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetTaxonomy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.Taxonomy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "GetTaxonomy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_CreatePolicyTag_async", - "title": "DataCatalog createPolicyTag Sample", - "origin": "API_DEFINITION", - "description": " Creates a policy tag in the specified taxonomy.", - "canonical": true, - "file": "policy_tag_manager.create_policy_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreatePolicyTag", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "policy_tag", - "type": ".google.cloud.datacatalog.v1beta1.PolicyTag" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.PolicyTag", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "CreatePolicyTag", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_DeletePolicyTag_async", - "title": "DataCatalog deletePolicyTag Sample", - "origin": "API_DEFINITION", - "description": " Deletes a policy tag. Also deletes all of its descendant policy tags.", - "canonical": true, - "file": "policy_tag_manager.delete_policy_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeletePolicyTag", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "DeletePolicyTag", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_UpdatePolicyTag_async", - "title": "DataCatalog updatePolicyTag Sample", - "origin": "API_DEFINITION", - "description": " Updates a policy tag.", - "canonical": true, - "file": "policy_tag_manager.update_policy_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdatePolicyTag", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag", - "async": true, - "parameters": [ - { - "name": "policy_tag", - "type": ".google.cloud.datacatalog.v1beta1.PolicyTag" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.PolicyTag", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "UpdatePolicyTag", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_ListPolicyTags_async", - "title": "DataCatalog listPolicyTags Sample", - "origin": "API_DEFINITION", - "description": " Lists all policy tags in a taxonomy.", - "canonical": true, - "file": "policy_tag_manager.list_policy_tags.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListPolicyTags", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "ListPolicyTags", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_GetPolicyTag_async", - "title": "DataCatalog getPolicyTag Sample", - "origin": "API_DEFINITION", - "description": " Gets a policy tag.", - "canonical": true, - "file": "policy_tag_manager.get_policy_tag.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPolicyTag", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.PolicyTag", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "GetPolicyTag", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_GetIamPolicy_async", - "title": "DataCatalog getIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Gets the IAM policy for a taxonomy or a policy tag.", - "canonical": true, - "file": "policy_tag_manager.get_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.GetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "options", - "type": ".google.iam.v1.GetPolicyOptions" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.GetIamPolicy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_SetIamPolicy_async", - "title": "DataCatalog setIamPolicy Sample", - "origin": "API_DEFINITION", - "description": " Sets the IAM policy for a taxonomy or a policy tag.", - "canonical": true, - "file": "policy_tag_manager.set_iam_policy.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.SetIamPolicy", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "policy", - "type": ".google.iam.v1.Policy" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.iam.v1.Policy", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.SetIamPolicy", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManager_TestIamPermissions_async", - "title": "DataCatalog testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns the permissions that a caller has on the specified taxonomy or policy tag.", - "canonical": true, - "file": "policy_tag_manager.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "PolicyTagManagerClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager.TestIamPermissions", - "service": { - "shortName": "PolicyTagManager", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManager" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ImportTaxonomies_async", - "title": "DataCatalog importTaxonomies Sample", - "origin": "API_DEFINITION", - "description": " Imports all taxonomies and their policy tags to a project as new taxonomies. This method provides a bulk taxonomy / policy tag creation using nested proto structure.", - "canonical": true, - "file": "policy_tag_manager_serialization.import_taxonomies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ImportTaxonomies", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "inline_source", - "type": ".google.cloud.datacatalog.v1beta1.InlineSource" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse", - "client": { - "shortName": "PolicyTagManagerSerializationClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerializationClient" - }, - "method": { - "shortName": "ImportTaxonomies", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies", - "service": { - "shortName": "PolicyTagManagerSerialization", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization" - } - } - } - }, - { - "regionTag": "datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ExportTaxonomies_async", - "title": "DataCatalog exportTaxonomies Sample", - "origin": "API_DEFINITION", - "description": " Exports all taxonomies and their policy tags in a project. This method generates SerializedTaxonomy protos with nested policy tags that can be used as an input for future ImportTaxonomies calls.", - "canonical": true, - "file": "policy_tag_manager_serialization.export_taxonomies.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExportTaxonomies", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "taxonomies", - "type": "TYPE_STRING[]" - }, - { - "name": "serialized_taxonomies", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse", - "client": { - "shortName": "PolicyTagManagerSerializationClient", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerializationClient" - }, - "method": { - "shortName": "ExportTaxonomies", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies", - "service": { - "shortName": "PolicyTagManagerSerialization", - "fullName": "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization" - } - } - } - } - ] -} \ No newline at end of file diff --git a/samples/grantTagTemplateUserRole.js b/samples/grantTagTemplateUserRole.js deleted file mode 100644 index 7b64308e..00000000 --- a/samples/grantTagTemplateUserRole.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -async function main(projectId, templateId, memberId) { - // [START data_catalog_grant_tag_template_user_role] - // Import the Google Cloud client library. - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - const datacatalog = new DataCatalogClient(); - - async function grantTagTemplateUserRole() { - // Grant the tagTemplateUser role to a member of the project. - - /** - * TODO(developer): Uncomment the following lines before running the sample. - */ - // const projectId = 'my_project'; // Google Cloud Platform project - // const templateId = 'my_existing_template'; - // const memberId = 'my_member_id' - - const location = 'us-central1'; - - // Format the Template name. - const templateName = datacatalog.tagTemplatePath( - projectId, - location, - templateId - ); - - // Retrieve Template's current IAM Policy. - const [getPolicyResponse] = await datacatalog.getIamPolicy({ - resource: templateName, - }); - const policy = getPolicyResponse; - - // Add Tag Template User role and member to the policy. - policy.bindings.push({ - role: 'roles/datacatalog.tagTemplateUser', - members: [memberId], - }); - - const request = { - resource: templateName, - policy: policy, - }; - - // Update Template's policy. - const [updatePolicyResponse] = await datacatalog.setIamPolicy(request); - - updatePolicyResponse.bindings.forEach(binding => { - console.log(`Role: ${binding.role}, Members: ${binding.members}`); - }); - } - grantTagTemplateUserRole(); - // [END data_catalog_grant_tag_template_user_role] -} -main(...process.argv.slice(2)); diff --git a/samples/package.json b/samples/package.json deleted file mode 100644 index 86688f4b..00000000 --- a/samples/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@google-cloud/datacatalog-samples", - "description": "Samples for the Cloud Data Catalog client library for Node.js", - "license": "Apache-2.0", - "author": "Google LLC", - "engines": { - "node": ">=12.0.0" - }, - "repository": "googleapis/nodejs-datacatalog", - "private": true, - "files": [ - "*.js" - ], - "scripts": { - "test": "mocha --timeout 600000" - }, - "dependencies": { - "@google-cloud/bigquery": "^6.0.0", - "@google-cloud/datacatalog": "^3.1.1", - "uuid": "^9.0.0" - }, - "devDependencies": { - "chai": "^4.2.0", - "execa": "^5.0.0", - "mocha": "^8.0.0" - } -} diff --git a/samples/policyTagManager/createPolicyTag.js b/samples/policyTagManager/createPolicyTag.js deleted file mode 100644 index 820a0657..00000000 --- a/samples/policyTagManager/createPolicyTag.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -function main(parent) { - // [START data_catalog_ptm_create_policytag] - // Create a policy tag resource under a given parent taxonomy. - - // Import the Google Cloud client library. - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - const policyClient = new PolicyTagManagerClient(); - - async function createPolicyTag() { - /** - * TODO(developer): Uncomment the following lines before running the sample. - */ - // const projectId = 'my_project'; // Google Cloud Platform project - // const location = 'us'; - // const taxonomy = 'my_existing_taxonomy'; - // const parent = `projects/${projectId}/locations/${location}/taxonomies/${taxonomy}`; - - const request = { - parent, - policyTag: { - displayName: 'nodejs_samples_tag', - // // It optionally accepts a parent ID, which can be used to create a hierarchical - // // relationship between tags. - // parentPolicyTag: `projects/${projectId}/locations/${location}/taxonomies/${taxonomy}/policyTags/my_existing_policy_tag` - }, - }; - - try { - const [metadata] = await policyClient.createPolicyTag(request); - console.log(`Created policy tag: ${metadata.name}`); - } catch (e) { - console.error(e); - process.exitCode = 1; - } - } - // [END data_catalog_ptm_create_policytag] - createPolicyTag(); -} -main(...process.argv.slice(2)); diff --git a/samples/policyTagManager/createTaxonomy.js b/samples/policyTagManager/createTaxonomy.js deleted file mode 100644 index 542d0c9f..00000000 --- a/samples/policyTagManager/createTaxonomy.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -function main(projectId, location, displayName) { - // [START data_catalog_ptm_create_taxonomy] - // Import the Google Cloud client library. - const {DataCatalogClient, PolicyTagManagerClient} = - require('@google-cloud/datacatalog').v1; - const dataCatalog = new DataCatalogClient(); - const policyTagManager = new PolicyTagManagerClient(); - - async function createTaxonomy() { - // const location = 'us'; - /** - * TODO(developer): Uncomment the following lines before running the sample. - */ - // const projectId = 'my_project'; // Google Cloud Platform project - // const location = 'us' - // const displayName = 'my_display_name'; // Display name for new taxonomy. - - // Parent project location format is `projects/${projectId}/locations/${location}` - const parent = dataCatalog.locationPath(projectId, location); - - const request = { - parent: parent, - taxonomy: { - displayName: displayName, - activatedPolicyTypes: ['FINE_GRAINED_ACCESS_CONTROL'], - }, - }; - - try { - const [metadata] = await policyTagManager.createTaxonomy(request); - console.log(`Created taxonomy: ${metadata.name}`); - } catch (e) { - console.error(e); - process.exitCode = 1; - } - } - // [END data_catalog_ptm_create_taxonomy] - createTaxonomy(); -} -main(...process.argv.slice(2)); diff --git a/samples/policyTagManager/deleteTaxonomy.js b/samples/policyTagManager/deleteTaxonomy.js deleted file mode 100644 index 597ca826..00000000 --- a/samples/policyTagManager/deleteTaxonomy.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -function main(taxonomyName) { - // [START data_catalog_ptm_delete_taxonomy] - // Import the Google Cloud client library. - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - const policyTagManager = new PolicyTagManagerClient(); - - async function deleteTaxonomy() { - /** - * TODO(developer): Uncomment the following line before running the sample. - */ - // const projectId = 'my_project'; // Google Cloud Platform project - // const location = 'us'; - // const taxonomy = 'my_existing_taxonomy'; - // const taxonomyName = `projects/${projectId}/locations/${location}/taxonomies/${taxonomy}`; - - const request = { - name: taxonomyName, - }; - - try { - await policyTagManager.deleteTaxonomy(request); - console.log(`Deleted taxonomy: ${taxonomyName}`); - } catch (e) { - console.error(e); - process.exitCode = 1; - } - } - // [END data_catalog_ptm_delete_taxonomy] - deleteTaxonomy(); -} -main(...process.argv.slice(2)); diff --git a/samples/policyTagManager/getTaxonomy.js b/samples/policyTagManager/getTaxonomy.js deleted file mode 100644 index dbf3a59a..00000000 --- a/samples/policyTagManager/getTaxonomy.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -function main(taxonomyName) { - // [START data_catalog_ptm_get_taxonomy] - // Import the Google Cloud client library. - const {PolicyTagManagerClient} = require('@google-cloud/datacatalog').v1; - const policyTagManager = new PolicyTagManagerClient(); - - async function getTaxonomy() { - /** - * TODO(developer): Uncomment the following line before running the sample. - */ - // const projectId = 'my_project'; // Google Cloud Platform project - // const location = 'us'; - // const taxonomy = 'my_existing_taxonomy'; - // const taxonomyName = `projects/${projectId}/locations/${location}/taxonomies/${taxonomy}`; - - const request = { - name: taxonomyName, - }; - - try { - const [taxonomy] = await policyTagManager.getTaxonomy(request); - console.log(`Retrieved taxonomy: ${taxonomy.name}`); - } catch (e) { - console.error(e); - process.exitCode = 1; - } - } - // [END data_catalog_ptm_get_taxonomy] - getTaxonomy(); -} -main(...process.argv.slice(2)); diff --git a/samples/policyTagManager/listTaxonomies.js b/samples/policyTagManager/listTaxonomies.js deleted file mode 100644 index fcfa23b8..00000000 --- a/samples/policyTagManager/listTaxonomies.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -function main(projectId, location) { - // [START data_catalog_ptm_list_taxonomies] - // Import the Google Cloud client library. - const {DataCatalogClient, PolicyTagManagerClient} = - require('@google-cloud/datacatalog').v1; - const dataCatalog = new DataCatalogClient(); - const policyTagManager = new PolicyTagManagerClient(); - - async function listTaxonomies() { - /** - * TODO(developer): Uncomment the following lines before running the sample. - */ - // const projectId = 'my_project'; // Google Cloud Platform project - // const location = 'us'; - - // Parent project location format is `projects/${projectId}/locations/${location}` - const parent = dataCatalog.locationPath(projectId, location); - - const request = { - parent: parent, - }; - - try { - const [taxonomies] = await policyTagManager.listTaxonomies(request); - console.log('Taxonomies:'); - taxonomies.forEach(taxonomy => { - console.log(taxonomy.name); - }); - } catch (e) { - console.error(e); - process.exitCode = 1; - } - } - // [END data_catalog_ptm_list_taxonomies] - listTaxonomies(); -} -main(...process.argv.slice(2)); diff --git a/samples/quickstart.js b/samples/quickstart.js deleted file mode 100644 index 9e8ef194..00000000 --- a/samples/quickstart.js +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -async function main(projectId, datasetId, tableId) { - // [START data_catalog_quickstart] - // Import the Google Cloud client library and create a client. - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - const datacatalog = new DataCatalogClient(); - - async function quickstart() { - // Common fields. - let request; - let responses; - - /** - * TODO(developer): Uncomment the following lines before running the sample. - */ - // const projectId = 'my_project'; // Google Cloud Platform project - // const datasetId = 'demo_dataset'; - // const tableId = 'trips'; - - // Currently, Data Catalog stores metadata in the - // us-central1 region. - const location = 'us-central1'; - - // Create Fields. - const fieldSource = { - displayName: 'Source of data asset', - type: { - primitiveType: 'STRING', - }, - }; - - const fieldNumRows = { - displayName: 'Number of rows in data asset', - type: { - primitiveType: 'DOUBLE', - }, - }; - - const fieldHasPII = { - displayName: 'Has PII', - type: { - primitiveType: 'BOOL', - }, - }; - - const fieldPIIType = { - displayName: 'PII type', - type: { - enumType: { - allowedValues: [ - { - displayName: 'EMAIL', - }, - { - displayName: 'SOCIAL SECURITY NUMBER', - }, - { - displayName: 'NONE', - }, - ], - }, - }, - }; - - // Create Tag Template. - const tagTemplateId = 'demo_tag_template'; - - const tagTemplate = { - displayName: 'Demo Tag Template', - fields: { - source: fieldSource, - num_rows: fieldNumRows, - has_pii: fieldHasPII, - pii_type: fieldPIIType, - }, - }; - - const tagTemplatePath = datacatalog.tagTemplatePath( - projectId, - location, - tagTemplateId - ); - - // Delete any pre-existing Template with the same name. - try { - request = { - name: tagTemplatePath, - force: true, - }; - await datacatalog.deleteTagTemplate(request); - console.log(`Deleted template: ${tagTemplatePath}`); - } catch (error) { - console.log(`Cannot delete template: ${tagTemplatePath}`); - } - - // Create the Tag Template request. - const locationPath = datacatalog.locationPath(projectId, location); - - request = { - parent: locationPath, - tagTemplateId: tagTemplateId, - tagTemplate: tagTemplate, - }; - - // Execute the request. - responses = await datacatalog.createTagTemplate(request); - const createdTagTemplate = responses[0]; - console.log(`Created template: ${createdTagTemplate.name}`); - - // Lookup Data Catalog's Entry referring to the table. - responses = await datacatalog.lookupEntry({ - linkedResource: - '//bigquery.googleapis.com/projects/' + - `${projectId}/datasets/${datasetId}/tables/${tableId}`, - }); - const entry = responses[0]; - console.log(`Entry name: ${entry.name}`); - console.log(`Entry type: ${entry.type}`); - console.log(`Linked resource: ${entry.linkedResource}`); - - // Attach a Tag to the table. - const tag = { - name: entry.name, - template: createdTagTemplate.name, - fields: { - source: { - stringValue: 'copied from tlc_yellow_trips_2017', - }, - num_rows: { - doubleValue: 113496874, - }, - has_pii: { - boolValue: false, - }, - pii_type: { - enumValue: { - displayName: 'NONE', - }, - }, - }, - }; - - request = { - parent: entry.name, - tag: tag, - }; - - // Create the Tag. - await datacatalog.createTag(request); - console.log(`Tag created for entry: ${entry.name}`); - } - quickstart(); - // [END data_catalog_quickstart] -} -main(...process.argv.slice(2)); diff --git a/samples/searchAssets.js b/samples/searchAssets.js deleted file mode 100644 index 03c91d1c..00000000 --- a/samples/searchAssets.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -async function main(projectId) { - // [START data_catalog_search_assets] - // Import the Google Cloud client library. - const {DataCatalogClient} = require('@google-cloud/datacatalog').v1; - const datacatalog = new DataCatalogClient(); - - async function searchAssets() { - // Search data assets. - - /** - * TODO(developer): Uncomment the following lines before running the sample. - */ - // const projectId = 'my_project'; // Google Cloud Platform project - - // Set custom query. - const query = 'type=dataset'; - - // Create request. - const scope = { - includeProjectIds: [projectId], - // Alternatively, search using Google Cloud Organization scopes. - // includeOrgIds: [organizationId], - }; - - const request = { - scope: scope, - query: query, - }; - - const [result] = await datacatalog.searchCatalog(request); - - console.log(`Found ${result.length} datasets in project ${projectId}.`); - console.log('Datasets:'); - result.forEach(dataset => { - console.log(dataset.relativeResourceName); - }); - } - searchAssets(); - // [END data_catalog_search_assets] -} -main(...process.argv.slice(2)); diff --git a/samples/test/.eslintrc.yml b/samples/test/.eslintrc.yml deleted file mode 100644 index e1e03e91..00000000 --- a/samples/test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -rules: - node/no-extraneous-require: off \ No newline at end of file diff --git a/samples/test/quickstart.test.js b/samples/test/quickstart.test.js deleted file mode 100644 index 61efbdaf..00000000 --- a/samples/test/quickstart.test.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it, before} = require('mocha'); -const uuid = require('uuid'); -const cp = require('child_process'); -const {BigQuery} = require('@google-cloud/bigquery'); - -const bigquery = new BigQuery(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const GCLOUD_TESTS_PREFIX = 'nodejs_data_catalog_samples'; -const generateUuid = () => - `${GCLOUD_TESTS_PREFIX}_${uuid.v4()}`.replace(/-/gi, '_'); - -describe('Quickstart', async () => { - const projectId = process.env.GCLOUD_PROJECT; - let datasetId; - let tableId; - - before(async () => { - // Delete any stale datasets from samples tests - await deleteDatasets(); - - // Create BigQuery dataset & table. - datasetId = generateUuid(); - tableId = generateUuid(); - await bigquery.createDataset(datasetId); - await bigquery.dataset(datasetId).createTable(tableId); - }); - - it('quickstart should attach tag to BigQuery table', async () => { - const output = execSync( - `node quickstart ${projectId} ${datasetId} ${tableId}` - ); - assert.include(output, 'Created template:'); - assert.include( - output, - `Linked resource: //bigquery.googleapis.com/projects/${projectId}/datasets/${datasetId}/tables/${tableId}` - ); - assert.include(output, 'Tag created for entry:'); - }); - - // Only delete a resource if it is older than 24 hours. That will prevent - // collisions with parallel CI test runs. - function isResourceStale(creationTime) { - const oneDayMs = 86400000; - const now = new Date(); - const created = new Date(creationTime); - return now.getTime() - created.getTime() >= oneDayMs; - } - - async function deleteDatasets() { - let [datasets] = await bigquery.getDatasets(); - datasets = datasets.filter(dataset => - dataset.id.includes(GCLOUD_TESTS_PREFIX) - ); - - for (const dataset of datasets) { - const [metadata] = await dataset.getMetadata(); - const creationTime = Number(metadata.creationTime); - - if (isResourceStale(creationTime)) { - try { - await dataset.delete({force: true}); - } catch (e) { - console.log(`dataset(${dataset.id}).delete() failed`); - console.log(e); - } - } - } - } -}); diff --git a/samples/test/samples.test.js b/samples/test/samples.test.js deleted file mode 100644 index e93f16b0..00000000 --- a/samples/test/samples.test.js +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.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. - -'use strict'; - -const {assert} = require('chai'); -const {describe, it, before} = require('mocha'); -const uuid = require('uuid'); -const cp = require('child_process'); -const {DataCatalogClient, PolicyTagManagerClient} = - require('@google-cloud/datacatalog').v1; -const datacatalog = new DataCatalogClient(); -const policyTagManager = new PolicyTagManagerClient(); - -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); - -const GCLOUD_TESTS_PREFIX = 'nodejs_samples_'; -const generateUuid = () => - `${GCLOUD_TESTS_PREFIX}_${uuid.v4()}`.replace(/-/gi, '_'); - -const TAG_TEMPLATE_ID = `${GCLOUD_TESTS_PREFIX}_test_tag_template`; -const projectId = process.env.GCLOUD_PROJECT; -const location = 'us-central1'; -let taxonomyName; - -describe('Samples', async () => { - before(async () => { - // Delete stale resources from samples tests. - await deleteEntryGroups(); - await deleteTaxonomies(); - - // Create taxonomy resource - const parent = datacatalog.locationPath(projectId, 'us'); - const taxRequest = { - parent, - taxonomy: { - displayName: generateUuid(), - activatedPolicyTypes: ['FINE_GRAINED_ACCESS_CONTROL'], - }, - }; - const [taxonomy] = await policyTagManager.createTaxonomy(taxRequest); - taxonomyName = taxonomy.name; - }); - - describe('policyTagManager', async () => { - it('should create a taxonomy', async () => { - const taxLocation = 'us'; - const displayName = generateUuid(); - const output = execSync( - `node policyTagManager/createTaxonomy ${projectId} ${taxLocation} ${displayName}` - ); - assert.include(output, 'Created taxonomy:'); - }); - - it('should get a taxonomy', async () => { - const output = execSync( - `node policyTagManager/getTaxonomy ${taxonomyName}` - ); - assert.include(output, `Retrieved taxonomy: ${taxonomyName}`); - }); - - it('should list taxonomies', async () => { - const taxLocation = 'us'; - const output = execSync( - `node policyTagManager/listTaxonomies ${projectId} ${taxLocation}` - ); - assert.include(output, 'Taxonomies:'); - }); - - it('should delete a taxonomy', async () => { - const output = execSync( - `node policyTagManager/deleteTaxonomy ${taxonomyName}` - ); - assert.include(output, 'Deleted taxonomy:'); - }); - - it('should create a policy tag', async () => { - const tagLocation = 'us'; - const displayName = generateUuid(); - const parent = datacatalog.locationPath(projectId, tagLocation); - - const request = { - parent: parent, - taxonomy: { - displayName: displayName, - activatedPolicyTypes: ['FINE_GRAINED_ACCESS_CONTROL'], - }, - }; - - const [taxonomy] = await policyTagManager.createTaxonomy(request); - - const output = execSync( - `node policyTagManager/createPolicyTag ${taxonomy.name}` - ); - assert.include(output, 'Created policy tag:'); - assert.include(output, taxonomy.name); - }); - }); - - it('should create a custom entry', async () => { - const entryGroupId = generateUuid(); - const entryId = generateUuid(); - const output = execSync( - `node createCustomEntry ${projectId} ${entryGroupId} ${entryId} ${TAG_TEMPLATE_ID}` - ); - assert.include(output, 'Created entry group:'); - assert.include(output, 'Created entry:'); - assert.include(output, 'Created template:'); - assert.include(output, 'Created tag:'); - }); - - it('should create a fileset', async () => { - const entryGroupId = generateUuid(); - const entryId = generateUuid(); - const output = execSync( - `node createFileset ${projectId} ${entryGroupId} ${entryId}` - ); - assert.include(output, `/entryGroups/${entryGroupId}/entries/${entryId}`); - assert.include(output, 'Display name:'); - assert.include(output, 'Type: FILESET'); - }); - - it('should grant tagTemplateUser role', async () => { - const resourceName = `${datacatalog.locationPath( - projectId, - location - )}/tagTemplates/${TAG_TEMPLATE_ID}`; - const [policy] = await datacatalog.getIamPolicy({resource: resourceName}); - const memberId = policy.bindings[0].members[0]; - - const output = execSync( - `node grantTagTemplateUserRole ${projectId} ${TAG_TEMPLATE_ID} ${memberId}` - ); - assert.include(output, 'roles/datacatalog.tagTemplateUser'); - assert.include(output, memberId); - }); - - it.skip('should search data assets in project', async () => { - const output = execSync(`node searchAssets ${projectId}`); - assert.match(output, /Found [0-9]+ datasets in project/); - }); - - // Only delete a resource if it is older than 24 hours. That will prevent - // collisions with parallel CI test runs. - function isResourceStale(creationTime) { - const oneDayMs = 86400000; - const now = new Date(); - const created = new Date(creationTime * 1000); - return now.getTime() - created.getTime() >= oneDayMs; - } - - async function deleteTaxonomies() { - const projectId = await policyTagManager.getProjectId(); - const location = 'us'; - - const listTaxonomiesRequest = { - parent: datacatalog.locationPath(projectId, location), - }; - - let [taxonomies] = await policyTagManager.listTaxonomies( - listTaxonomiesRequest - ); - - taxonomies = taxonomies.filter(taxonomy => { - return taxonomy.displayName.includes(GCLOUD_TESTS_PREFIX); - }); - - taxonomies.forEach(async taxonomy => { - if (isResourceStale(taxonomy.taxonomyTimestamps.createTime.seconds)) { - try { - await policyTagManager.deleteTaxonomy({name: taxonomy.name}); - } catch (e) { - console.error(e); - } - } - }); - } - - async function deleteEntries(entryGroupId) { - const [entries] = await datacatalog.listEntries({parent: entryGroupId}); - for (const entry of entries) { - try { - await datacatalog.deleteEntry({name: entry.name}); - } catch (e) { - console.log(`entry (${entry.name}).delete() failed`); - console.log(e); - } - } - } - - async function deleteEntryGroups() { - const listEntryGroupsRequest = { - parent: datacatalog.locationPath(projectId, location), - }; - - const [entryGroups] = await datacatalog.listEntryGroups( - listEntryGroupsRequest - ); - - const groups = entryGroups.filter(group => { - return group.name.includes(GCLOUD_TESTS_PREFIX); - }); - - for (const group of groups) { - const creationTime = Number( - group.dataCatalogTimestamps.createTime.seconds - ); - if (isResourceStale(creationTime)) { - try { - await deleteEntries(group.name); - await datacatalog.deleteEntryGroup({name: group.name}); - } catch (e) { - console.log(`entry group (${group.name}).delete() failed`); - console.log(e); - } - } - } - } -}); diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 2c180e26..00000000 --- a/src/index.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by synthtool. ** -// ** https://github.com/googleapis/synthtool ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; -import * as v1beta1 from './v1beta1'; - -const DataCatalogClient = v1.DataCatalogClient; -type DataCatalogClient = v1.DataCatalogClient; -const PolicyTagManagerClient = v1.PolicyTagManagerClient; -type PolicyTagManagerClient = v1.PolicyTagManagerClient; -const PolicyTagManagerSerializationClient = - v1.PolicyTagManagerSerializationClient; -type PolicyTagManagerSerializationClient = - v1.PolicyTagManagerSerializationClient; - -export { - v1, - v1beta1, - DataCatalogClient, - PolicyTagManagerClient, - PolicyTagManagerSerializationClient, -}; -export default { - v1, - v1beta1, - DataCatalogClient, - PolicyTagManagerClient, - PolicyTagManagerSerializationClient, -}; -import * as protos from '../protos/protos'; -export {protos}; diff --git a/src/v1/data_catalog_client.ts b/src/v1/data_catalog_client.ts deleted file mode 100644 index 50eb7bfe..00000000 --- a/src/v1/data_catalog_client.ts +++ /dev/null @@ -1,4859 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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/data_catalog_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './data_catalog_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Data Catalog API service allows you to discover, understand, and manage - * your data. - * @class - * @memberof v1 - */ -export class DataCatalogClient { - 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}; - 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}; - dataCatalogStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of DataCatalogClient. - * - * @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 | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. - * 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 DataCatalogClient({fallback: 'rest'}, gax); - * ``` - */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback - ) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof DataCatalogClient; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.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); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.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 = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { - 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 = { - entryPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}' - ), - entryGroupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - policyTagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - tagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}' - ), - tagTemplatePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}' - ), - tagTemplateFieldPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}' - ), - tagTemplateFieldEnumValuePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}' - ), - taxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}' - ), - }; - - // 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 = { - searchCatalog: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'results' - ), - listEntryGroups: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'entryGroups' - ), - listEntries: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'entries' - ), - listTags: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'tags' - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.datacatalog.v1.DataCatalog', - 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.dataCatalogStub) { - return this.dataCatalogStub; - } - - // Put together the "service stub" for - // google.cloud.datacatalog.v1.DataCatalog. - this.dataCatalogStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.datacatalog.v1.DataCatalog' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.datacatalog.v1.DataCatalog, - 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 dataCatalogStubMethods = [ - 'searchCatalog', - 'createEntryGroup', - 'getEntryGroup', - 'updateEntryGroup', - 'deleteEntryGroup', - 'listEntryGroups', - 'createEntry', - 'updateEntry', - 'deleteEntry', - 'getEntry', - 'lookupEntry', - 'listEntries', - 'modifyEntryOverview', - 'modifyEntryContacts', - 'createTagTemplate', - 'getTagTemplate', - 'updateTagTemplate', - 'deleteTagTemplate', - 'createTagTemplateField', - 'updateTagTemplateField', - 'renameTagTemplateField', - 'renameTagTemplateFieldEnumValue', - 'deleteTagTemplateField', - 'createTag', - 'updateTag', - 'deleteTag', - 'listTags', - 'starEntry', - 'unstarEntry', - 'setIamPolicy', - 'getIamPolicy', - 'testIamPermissions', - ]; - for (const methodName of dataCatalogStubMethods) { - const callPromise = this.dataCatalogStub.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.dataCatalogStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - return 'datacatalog.googleapis.com'; - } - - /** - * 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 -- - // ------------------- - /** - * Creates an entry group. - * - * An entry group contains logically related entries together with [Cloud - * Identity and Access Management](/data-catalog/docs/concepts/iam) policies. - * These policies specify users who can create, edit, and view entries - * within entry groups. - * - * Data Catalog automatically creates entry groups with names that start with - * the `@` symbol for the following resources: - * - * * BigQuery entries (`@bigquery`) - * * Pub/Sub topics (`@pubsub`) - * * Dataproc Metastore services (`@dataproc_metastore_{SERVICE_NAME_HASH}`) - * - * You can create your own entry groups for Cloud Storage fileset entries - * and custom entries together with the corresponding IAM policies. - * User-created entry groups can't contain the `@` symbol, it is reserved - * for automatically created groups. - * - * Entry groups, like entries, can be searched. - * - * A maximum of 10,000 entry groups may be created per organization across all - * locations. - * - * You must enable the Data Catalog API in the project identified by - * the `parent` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The names of the project and location that the new entry group belongs to. - * - * Note: The entry group itself and its child resources might not be - * stored in the location specified in its name. - * @param {string} request.entryGroupId - * Required. The ID of the entry group to create. - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * @param {google.cloud.datacatalog.v1.EntryGroup} request.entryGroup - * The entry group to create. Defaults to empty. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [EntryGroup]{@link google.cloud.datacatalog.v1.EntryGroup}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.create_entry_group.js - * region_tag:datacatalog_v1_generated_DataCatalog_CreateEntryGroup_async - */ - createEntryGroup( - request?: protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryGroup, - protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest | undefined, - {} | undefined - ] - >; - createEntryGroup( - request: protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createEntryGroup( - request: protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createEntryGroup( - request?: protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryGroup, - protos.google.cloud.datacatalog.v1.ICreateEntryGroupRequest | 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.createEntryGroup(request, options, callback); - } - /** - * Gets an entry group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry group to get. - * @param {google.protobuf.FieldMask} request.readMask - * The fields to return. If empty or omitted, all fields 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 an object representing [EntryGroup]{@link google.cloud.datacatalog.v1.EntryGroup}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.get_entry_group.js - * region_tag:datacatalog_v1_generated_DataCatalog_GetEntryGroup_async - */ - getEntryGroup( - request?: protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryGroup, - protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest | undefined, - {} | undefined - ] - >; - getEntryGroup( - request: protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getEntryGroup( - request: protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getEntryGroup( - request?: protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryGroup, - protos.google.cloud.datacatalog.v1.IGetEntryGroupRequest | 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.getEntryGroup(request, options, callback); - } - /** - * Updates an entry group. - * - * You must enable the Data Catalog API in the project identified by - * the `entry_group.name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1.EntryGroup} request.entryGroup - * Required. Updates for the entry group. The `name` field must be set. - * @param {google.protobuf.FieldMask} request.updateMask - * Names of fields whose values to overwrite on an entry group. - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [EntryGroup]{@link google.cloud.datacatalog.v1.EntryGroup}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.update_entry_group.js - * region_tag:datacatalog_v1_generated_DataCatalog_UpdateEntryGroup_async - */ - updateEntryGroup( - request?: protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryGroup, - protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest | undefined, - {} | undefined - ] - >; - updateEntryGroup( - request: protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateEntryGroup( - request: protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateEntryGroup( - request?: protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IEntryGroup, - | protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryGroup, - protos.google.cloud.datacatalog.v1.IUpdateEntryGroupRequest | 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({ - 'entry_group.name': request.entryGroup!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateEntryGroup(request, options, callback); - } - /** - * Deletes an entry group. - * - * You must enable the Data Catalog API in the project - * identified by the `name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry group to delete. - * @param {boolean} [request.force] - * Optional. If true, deletes all entries in the entry group. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.delete_entry_group.js - * region_tag:datacatalog_v1_generated_DataCatalog_DeleteEntryGroup_async - */ - deleteEntryGroup( - request?: protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest | undefined, - {} | undefined - ] - >; - deleteEntryGroup( - request: protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteEntryGroup( - request: protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteEntryGroup( - request?: protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteEntryGroupRequest | 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.deleteEntryGroup(request, options, callback); - } - /** - * Creates an entry. - * - * You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM', - * or custom types. Data Catalog automatically creates entries with other - * types during metadata ingestion from integrated systems. - * - * You must enable the Data Catalog API in the project identified by - * the `parent` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * An entry group can have a maximum of 100,000 entries. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the entry group this entry belongs to. - * - * Note: The entry itself and its child resources might not be stored in - * the location specified in its name. - * @param {string} request.entryId - * Required. The ID of the entry to create. - * - * The ID must contain only letters (a-z, A-Z), numbers (0-9), - * and underscores (_). - * The maximum size is 64 bytes when encoded in UTF-8. - * @param {google.cloud.datacatalog.v1.Entry} request.entry - * Required. The entry 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 [Entry]{@link google.cloud.datacatalog.v1.Entry}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.create_entry.js - * region_tag:datacatalog_v1_generated_DataCatalog_CreateEntry_async - */ - createEntry( - request?: protos.google.cloud.datacatalog.v1.ICreateEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ICreateEntryRequest | undefined, - {} | undefined - ] - >; - createEntry( - request: protos.google.cloud.datacatalog.v1.ICreateEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ICreateEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - createEntry( - request: protos.google.cloud.datacatalog.v1.ICreateEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ICreateEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - createEntry( - request?: protos.google.cloud.datacatalog.v1.ICreateEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IEntry, - | protos.google.cloud.datacatalog.v1.ICreateEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ICreateEntryRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ICreateEntryRequest | 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.createEntry(request, options, callback); - } - /** - * Updates an existing entry. - * - * You must enable the Data Catalog API in the project identified by - * the `entry.name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1.Entry} request.entry - * Required. Updates for the entry. The `name` field must be set. - * @param {google.protobuf.FieldMask} request.updateMask - * Names of fields whose values to overwrite on an entry. - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * You can modify only the fields listed below. - * - * For entries with type `DATA_STREAM`: - * - * * `schema` - * - * For entries with type `FILESET`: - * - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * - * For entries with `user_specified_type`: - * - * * `schema` - * * `display_name` - * * `description` - * * `user_specified_type` - * * `user_specified_system` - * * `linked_resource` - * * `source_system_timestamps` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Entry]{@link google.cloud.datacatalog.v1.Entry}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.update_entry.js - * region_tag:datacatalog_v1_generated_DataCatalog_UpdateEntry_async - */ - updateEntry( - request?: protos.google.cloud.datacatalog.v1.IUpdateEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IUpdateEntryRequest | undefined, - {} | undefined - ] - >; - updateEntry( - request: protos.google.cloud.datacatalog.v1.IUpdateEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IUpdateEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - updateEntry( - request: protos.google.cloud.datacatalog.v1.IUpdateEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IUpdateEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - updateEntry( - request?: protos.google.cloud.datacatalog.v1.IUpdateEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IEntry, - | protos.google.cloud.datacatalog.v1.IUpdateEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IUpdateEntryRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IUpdateEntryRequest | 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({ - 'entry.name': request.entry!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateEntry(request, options, callback); - } - /** - * Deletes an existing entry. - * - * You can delete only the entries created by the - * {@link google.cloud.datacatalog.v1.DataCatalog.CreateEntry|CreateEntry} - * method. - * - * You must enable the Data Catalog API in the project identified by - * the `name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.delete_entry.js - * region_tag:datacatalog_v1_generated_DataCatalog_DeleteEntry_async - */ - deleteEntry( - request?: protos.google.cloud.datacatalog.v1.IDeleteEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteEntryRequest | undefined, - {} | undefined - ] - >; - deleteEntry( - request: protos.google.cloud.datacatalog.v1.IDeleteEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - deleteEntry( - request: protos.google.cloud.datacatalog.v1.IDeleteEntryRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - deleteEntry( - request?: protos.google.cloud.datacatalog.v1.IDeleteEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteEntryRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteEntryRequest | 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.deleteEntry(request, options, callback); - } - /** - * Gets an entry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry to get. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Entry]{@link google.cloud.datacatalog.v1.Entry}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.get_entry.js - * region_tag:datacatalog_v1_generated_DataCatalog_GetEntry_async - */ - getEntry( - request?: protos.google.cloud.datacatalog.v1.IGetEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IGetEntryRequest | undefined, - {} | undefined - ] - >; - getEntry( - request: protos.google.cloud.datacatalog.v1.IGetEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IGetEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - getEntry( - request: protos.google.cloud.datacatalog.v1.IGetEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IGetEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - getEntry( - request?: protos.google.cloud.datacatalog.v1.IGetEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IEntry, - | protos.google.cloud.datacatalog.v1.IGetEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IGetEntryRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.IGetEntryRequest | 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.getEntry(request, options, callback); - } - /** - * Gets an entry by its target resource name. - * - * The resource name comes from the source Google Cloud Platform service. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.linkedResource - * The full name of the Google Cloud Platform resource the Data Catalog - * entry represents. For more information, see [Full Resource Name] - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * - * Full names are case-sensitive. For example: - * - * * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` - * * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` - * @param {string} request.sqlResource - * The SQL name of the entry. SQL names are case-sensitive. - * - * Examples: - * - * * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` - * * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` - * * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` - * * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` - * * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` - * - * Identifiers (`*_ID`) should comply with the - * [Lexical structure in Standard SQL] - * (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). - * @param {string} request.fullyQualifiedName - * Fully qualified name (FQN) of the resource. - * - * FQNs take two forms: - * - * * For non-regionalized resources: - * - * `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * - * * For regionalized resources: - * - * `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` - * - * Example for a DPMS table: - * - * `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1.Entry}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.lookup_entry.js - * region_tag:datacatalog_v1_generated_DataCatalog_LookupEntry_async - */ - lookupEntry( - request?: protos.google.cloud.datacatalog.v1.ILookupEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ILookupEntryRequest | undefined, - {} | undefined - ] - >; - lookupEntry( - request: protos.google.cloud.datacatalog.v1.ILookupEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ILookupEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - lookupEntry( - request: protos.google.cloud.datacatalog.v1.ILookupEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ILookupEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - lookupEntry( - request?: protos.google.cloud.datacatalog.v1.ILookupEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IEntry, - | protos.google.cloud.datacatalog.v1.ILookupEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ILookupEntryRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry, - protos.google.cloud.datacatalog.v1.ILookupEntryRequest | 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 || {}; - this.initialize(); - return this.innerApiCalls.lookupEntry(request, options, callback); - } - /** - * Modifies entry overview, part of the business context of an - * {@link google.cloud.datacatalog.v1.Entry|Entry}. - * - * To call this method, you must have the `datacatalog.entries.updateOverview` - * IAM permission on the corresponding project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The full resource name of the entry. - * @param {google.cloud.datacatalog.v1.EntryOverview} request.entryOverview - * Required. The new value for the Entry 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 [EntryOverview]{@link google.cloud.datacatalog.v1.EntryOverview}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.modify_entry_overview.js - * region_tag:datacatalog_v1_generated_DataCatalog_ModifyEntryOverview_async - */ - modifyEntryOverview( - request?: protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryOverview, - ( - | protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest - | undefined - ), - {} | undefined - ] - >; - modifyEntryOverview( - request: protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntryOverview, - | protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest - | null - | undefined, - {} | null | undefined - > - ): void; - modifyEntryOverview( - request: protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IEntryOverview, - | protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest - | null - | undefined, - {} | null | undefined - > - ): void; - modifyEntryOverview( - request?: protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IEntryOverview, - | protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IEntryOverview, - | protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryOverview, - ( - | protos.google.cloud.datacatalog.v1.IModifyEntryOverviewRequest - | 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.modifyEntryOverview(request, options, callback); - } - /** - * Modifies contacts, part of the business context of an - * {@link google.cloud.datacatalog.v1.Entry|Entry}. - * - * To call this method, you must have the `datacatalog.entries.updateContacts` - * IAM permission on the corresponding project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The full resource name of the entry. - * @param {google.cloud.datacatalog.v1.Contacts} request.contacts - * Required. The new value for the Contacts. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Contacts]{@link google.cloud.datacatalog.v1.Contacts}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.modify_entry_contacts.js - * region_tag:datacatalog_v1_generated_DataCatalog_ModifyEntryContacts_async - */ - modifyEntryContacts( - request?: protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IContacts, - ( - | protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest - | undefined - ), - {} | undefined - ] - >; - modifyEntryContacts( - request: protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IContacts, - | protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest - | null - | undefined, - {} | null | undefined - > - ): void; - modifyEntryContacts( - request: protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IContacts, - | protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest - | null - | undefined, - {} | null | undefined - > - ): void; - modifyEntryContacts( - request?: protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IContacts, - | protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IContacts, - | protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IContacts, - ( - | protos.google.cloud.datacatalog.v1.IModifyEntryContactsRequest - | 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.modifyEntryContacts(request, options, callback); - } - /** - * Creates a tag template. - * - * You must enable the Data Catalog API in the project identified by the - * `parent` parameter. - * For more information, see [Data Catalog resource project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * @param {string} request.tagTemplateId - * Required. The ID of the tag template to create. - * - * The ID must contain only lowercase letters (a-z), numbers (0-9), - * or underscores (_), and must start with a letter or underscore. - * The maximum size is 64 bytes when encoded in UTF-8. - * @param {google.cloud.datacatalog.v1.TagTemplate} request.tagTemplate - * Required. The tag template 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 [TagTemplate]{@link google.cloud.datacatalog.v1.TagTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.create_tag_template.js - * region_tag:datacatalog_v1_generated_DataCatalog_CreateTagTemplate_async - */ - createTagTemplate( - request?: protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplate, - protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest | undefined, - {} | undefined - ] - >; - createTagTemplate( - request: protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTagTemplate( - request: protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTagTemplate( - request?: protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplate, - protos.google.cloud.datacatalog.v1.ICreateTagTemplateRequest | 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.createTagTemplate(request, options, callback); - } - /** - * Gets a tag template. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template to get. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TagTemplate]{@link google.cloud.datacatalog.v1.TagTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.get_tag_template.js - * region_tag:datacatalog_v1_generated_DataCatalog_GetTagTemplate_async - */ - getTagTemplate( - request?: protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplate, - protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest | undefined, - {} | undefined - ] - >; - getTagTemplate( - request: protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getTagTemplate( - request: protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getTagTemplate( - request?: protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplate, - protos.google.cloud.datacatalog.v1.IGetTagTemplateRequest | 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.getTagTemplate(request, options, callback); - } - /** - * Updates a tag template. - * - * You can't update template fields with this method. These fields are - * separate resources with their own create, update, and delete methods. - * - * You must enable the Data Catalog API in the project identified by - * the `tag_template.name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1.TagTemplate} request.tagTemplate - * Required. The template to update. The `name` field must be set. - * @param {google.protobuf.FieldMask} request.updateMask - * Names of fields whose values to overwrite on a tag template. Currently, - * only `display_name` and `is_publicly_readable` can be overwritten. - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * - * Note: Updating the `is_publicly_readable` field may require up to 12 - * hours to take effect in search results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1.TagTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.update_tag_template.js - * region_tag:datacatalog_v1_generated_DataCatalog_UpdateTagTemplate_async - */ - updateTagTemplate( - request?: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplate, - protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest | undefined, - {} | undefined - ] - >; - updateTagTemplate( - request: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTagTemplate( - request: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTagTemplate( - request?: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplate, - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplate, - protos.google.cloud.datacatalog.v1.IUpdateTagTemplateRequest | 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({ - 'tag_template.name': request.tagTemplate!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateTagTemplate(request, options, callback); - } - /** - * Deletes a tag template and all tags that use it. - * - * You must enable the Data Catalog API in the project identified by - * the `name` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template to delete. - * @param {boolean} request.force - * Required. If true, deletes all tags that use this template. - * - * Currently, `true` is the only supported value. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.delete_tag_template.js - * region_tag:datacatalog_v1_generated_DataCatalog_DeleteTagTemplate_async - */ - deleteTagTemplate( - request?: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest | undefined, - {} | undefined - ] - >; - deleteTagTemplate( - request: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTagTemplate( - request: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTagTemplate( - request?: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteTagTemplateRequest | 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.deleteTagTemplate(request, options, callback); - } - /** - * Creates a field in a tag template. - * - * You must enable the Data Catalog API in the project identified by - * the `parent` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * @param {string} request.tagTemplateFieldId - * Required. The ID of the tag template field to create. - * - * Note: Adding a required field to an existing template is *not* allowed. - * - * Field IDs can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * @param {google.cloud.datacatalog.v1.TagTemplateField} request.tagTemplateField - * Required. The tag template field 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 [TagTemplateField]{@link google.cloud.datacatalog.v1.TagTemplateField}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.create_tag_template_field.js - * region_tag:datacatalog_v1_generated_DataCatalog_CreateTagTemplateField_async - */ - createTagTemplateField( - request?: protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest - | undefined - ), - {} | undefined - ] - >; - createTagTemplateField( - request: protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTagTemplateField( - request: protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTagTemplateField( - request?: protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1.ICreateTagTemplateFieldRequest - | 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.createTagTemplateField( - request, - options, - callback - ); - } - /** - * Updates a field in a tag template. - * - * You can't update the field type with this method. - * - * You must enable the Data Catalog API in the project - * identified by the `name` parameter. For more information, see [Data Catalog - * resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template field. - * @param {google.cloud.datacatalog.v1.TagTemplateField} request.tagTemplateField - * Required. The template to update. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Names of fields whose values to overwrite on an individual field of a tag - * template. The following fields are modifiable: - * - * * `display_name` - * * `type.enum_type` - * * `is_required` - * - * If this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the request - * body, their values are emptied with one exception: when updating an enum - * type, the provided values are merged with the existing values. Therefore, - * enum values can only be added, existing enum values cannot be deleted or - * renamed. - * - * Additionally, updating a template field from optional to required is - * *not* allowed. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TagTemplateField]{@link google.cloud.datacatalog.v1.TagTemplateField}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.update_tag_template_field.js - * region_tag:datacatalog_v1_generated_DataCatalog_UpdateTagTemplateField_async - */ - updateTagTemplateField( - request?: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest - | undefined - ), - {} | undefined - ] - >; - updateTagTemplateField( - request: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTagTemplateField( - request: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTagTemplateField( - request?: protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1.IUpdateTagTemplateFieldRequest - | 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.updateTagTemplateField( - request, - options, - callback - ); - } - /** - * Renames a field in a tag template. - * - * You must enable the Data Catalog API in the project identified by the - * `name` parameter. For more information, see [Data Catalog resource project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template field. - * @param {string} request.newTagTemplateFieldId - * Required. The new ID of this tag template field. For example, `my_new_field`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TagTemplateField]{@link google.cloud.datacatalog.v1.TagTemplateField}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.rename_tag_template_field.js - * region_tag:datacatalog_v1_generated_DataCatalog_RenameTagTemplateField_async - */ - renameTagTemplateField( - request?: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest - | undefined - ), - {} | undefined - ] - >; - renameTagTemplateField( - request: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - renameTagTemplateField( - request: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - renameTagTemplateField( - request?: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldRequest - | 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.renameTagTemplateField( - request, - options, - callback - ); - } - /** - * Renames an enum value in a tag template. - * - * Within a single enum field, enum values must be unique. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the enum field value. - * @param {string} request.newEnumValueDisplayName - * Required. The new display name of the enum value. For example, `my_new_enum_value`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TagTemplateField]{@link google.cloud.datacatalog.v1.TagTemplateField}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.rename_tag_template_field_enum_value.js - * region_tag:datacatalog_v1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_async - */ - renameTagTemplateFieldEnumValue( - request?: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest - | undefined - ), - {} | undefined - ] - >; - renameTagTemplateFieldEnumValue( - request: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest - | null - | undefined, - {} | null | undefined - > - ): void; - renameTagTemplateFieldEnumValue( - request: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest - | null - | undefined, - {} | null | undefined - > - ): void; - renameTagTemplateFieldEnumValue( - request?: protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1.IRenameTagTemplateFieldEnumValueRequest - | 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.renameTagTemplateFieldEnumValue( - request, - options, - callback - ); - } - /** - * Deletes a field in a tag template and all uses of this field from the tags - * based on this template. - * - * You must enable the Data Catalog API in the project identified by - * the `name` parameter. For more information, see [Data Catalog resource - * project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template field to delete. - * @param {boolean} request.force - * Required. If true, deletes this field from any tags that use it. - * - * Currently, `true` is the only supported value. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.delete_tag_template_field.js - * region_tag:datacatalog_v1_generated_DataCatalog_DeleteTagTemplateField_async - */ - deleteTagTemplateField( - request?: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest - | undefined - ), - {} | undefined - ] - >; - deleteTagTemplateField( - request: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTagTemplateField( - request: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTagTemplateField( - request?: protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1.IDeleteTagTemplateFieldRequest - | 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.deleteTagTemplateField( - request, - options, - callback - ); - } - /** - * Creates a tag and assigns it to: - * - * * An {@link google.cloud.datacatalog.v1.Entry|Entry} if the method name is - * `projects.locations.entryGroups.entries.tags.create`. - * * Or {@link google.cloud.datacatalog.v1.EntryGroup|EntryGroup}if the method - * name is `projects.locations.entryGroups.tags.create`. - * - * Note: The project identified by the `parent` parameter for the [tag] - * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) - * and the [tag template] - * (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) - * used to create the tag must be in the same organization. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the resource to attach this tag to. - * - * Tags can be attached to entries or entry groups. An entry can have up to - * 1000 attached tags. - * - * Note: The tag and its child resources might not be stored in - * the location specified in its name. - * @param {google.cloud.datacatalog.v1.Tag} request.tag - * Required. The tag 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 [Tag]{@link google.cloud.datacatalog.v1.Tag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.create_tag.js - * region_tag:datacatalog_v1_generated_DataCatalog_CreateTag_async - */ - createTag( - request?: protos.google.cloud.datacatalog.v1.ICreateTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.ICreateTagRequest | undefined, - {} | undefined - ] - >; - createTag( - request: protos.google.cloud.datacatalog.v1.ICreateTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.ICreateTagRequest | null | undefined, - {} | null | undefined - > - ): void; - createTag( - request: protos.google.cloud.datacatalog.v1.ICreateTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.ICreateTagRequest | null | undefined, - {} | null | undefined - > - ): void; - createTag( - request?: protos.google.cloud.datacatalog.v1.ICreateTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITag, - | protos.google.cloud.datacatalog.v1.ICreateTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.ICreateTagRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.ICreateTagRequest | 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.createTag(request, options, callback); - } - /** - * Updates an existing tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1.Tag} request.tag - * Required. The updated tag. The "name" field must be set. - * @param {google.protobuf.FieldMask} request.updateMask - * Names of fields whose values to overwrite on a tag. Currently, a tag has - * the only modifiable field with the name `fields`. - * - * In general, if this parameter is absent or empty, all modifiable fields - * are overwritten. If such fields are non-required and omitted in the - * request body, their values are emptied. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Tag]{@link google.cloud.datacatalog.v1.Tag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.update_tag.js - * region_tag:datacatalog_v1_generated_DataCatalog_UpdateTag_async - */ - updateTag( - request?: protos.google.cloud.datacatalog.v1.IUpdateTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.IUpdateTagRequest | undefined, - {} | undefined - ] - >; - updateTag( - request: protos.google.cloud.datacatalog.v1.IUpdateTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.IUpdateTagRequest | null | undefined, - {} | null | undefined - > - ): void; - updateTag( - request: protos.google.cloud.datacatalog.v1.IUpdateTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.IUpdateTagRequest | null | undefined, - {} | null | undefined - > - ): void; - updateTag( - request?: protos.google.cloud.datacatalog.v1.IUpdateTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITag, - | protos.google.cloud.datacatalog.v1.IUpdateTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.IUpdateTagRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITag, - protos.google.cloud.datacatalog.v1.IUpdateTagRequest | 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({ - 'tag.name': request.tag!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateTag(request, options, callback); - } - /** - * Deletes a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.delete_tag.js - * region_tag:datacatalog_v1_generated_DataCatalog_DeleteTag_async - */ - deleteTag( - request?: protos.google.cloud.datacatalog.v1.IDeleteTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteTagRequest | undefined, - {} | undefined - ] - >; - deleteTag( - request: protos.google.cloud.datacatalog.v1.IDeleteTagRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteTagRequest | null | undefined, - {} | null | undefined - > - ): void; - deleteTag( - request: protos.google.cloud.datacatalog.v1.IDeleteTagRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteTagRequest | null | undefined, - {} | null | undefined - > - ): void; - deleteTag( - request?: protos.google.cloud.datacatalog.v1.IDeleteTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteTagRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteTagRequest | 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.deleteTag(request, options, callback); - } - /** - * Marks an {@link google.cloud.datacatalog.v1.Entry|Entry} as starred by - * the current user. Starring information is private to each user. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry to mark as starred. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [StarEntryResponse]{@link google.cloud.datacatalog.v1.StarEntryResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.star_entry.js - * region_tag:datacatalog_v1_generated_DataCatalog_StarEntry_async - */ - starEntry( - request?: protos.google.cloud.datacatalog.v1.IStarEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IStarEntryResponse, - protos.google.cloud.datacatalog.v1.IStarEntryRequest | undefined, - {} | undefined - ] - >; - starEntry( - request: protos.google.cloud.datacatalog.v1.IStarEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IStarEntryResponse, - protos.google.cloud.datacatalog.v1.IStarEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - starEntry( - request: protos.google.cloud.datacatalog.v1.IStarEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IStarEntryResponse, - protos.google.cloud.datacatalog.v1.IStarEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - starEntry( - request?: protos.google.cloud.datacatalog.v1.IStarEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IStarEntryResponse, - | protos.google.cloud.datacatalog.v1.IStarEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IStarEntryResponse, - protos.google.cloud.datacatalog.v1.IStarEntryRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IStarEntryResponse, - protos.google.cloud.datacatalog.v1.IStarEntryRequest | 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.starEntry(request, options, callback); - } - /** - * Marks an {@link google.cloud.datacatalog.v1.Entry|Entry} as NOT starred by - * the current user. Starring information is private to each user. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry to mark as **not** starred. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [UnstarEntryResponse]{@link google.cloud.datacatalog.v1.UnstarEntryResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.unstar_entry.js - * region_tag:datacatalog_v1_generated_DataCatalog_UnstarEntry_async - */ - unstarEntry( - request?: protos.google.cloud.datacatalog.v1.IUnstarEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IUnstarEntryResponse, - protos.google.cloud.datacatalog.v1.IUnstarEntryRequest | undefined, - {} | undefined - ] - >; - unstarEntry( - request: protos.google.cloud.datacatalog.v1.IUnstarEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IUnstarEntryResponse, - protos.google.cloud.datacatalog.v1.IUnstarEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - unstarEntry( - request: protos.google.cloud.datacatalog.v1.IUnstarEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IUnstarEntryResponse, - protos.google.cloud.datacatalog.v1.IUnstarEntryRequest | null | undefined, - {} | null | undefined - > - ): void; - unstarEntry( - request?: protos.google.cloud.datacatalog.v1.IUnstarEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IUnstarEntryResponse, - | protos.google.cloud.datacatalog.v1.IUnstarEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IUnstarEntryResponse, - protos.google.cloud.datacatalog.v1.IUnstarEntryRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IUnstarEntryResponse, - protos.google.cloud.datacatalog.v1.IUnstarEntryRequest | 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.unstarEntry(request, options, callback); - } - /** - * Sets an access control policy for a resource. Replaces any existing - * policy. - * - * Supported resources are: - * - * - Tag templates - * - Entry groups - * - * Note: This method sets policies only within Data Catalog and can't be - * used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any - * external Google Cloud Platform resources synced with the Data Catalog. - * - * To call this method, you must have the following Google IAM permissions: - * - * - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag - * templates. - * - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.Policy} request.policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param {google.protobuf.FieldMask} request.updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.set_iam_policy.js - * region_tag:datacatalog_v1_generated_DataCatalog_SetIamPolicy_async - */ - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined - ] - >; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.setIamPolicy(request, options, callback); - } - /** - * Gets the access control policy for a resource. - * - * May return: - * - * * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - * permission to view it. - * * An empty policy if the resource exists but doesn't have a set policy. - * - * Supported resources are: - * - * - Tag templates - * - Entry groups - * - * Note: This method doesn't get policies from Google Cloud Platform - * resources ingested into Data Catalog. - * - * To call this method, you must have the following Google IAM permissions: - * - * - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag - * templates. - * - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.GetPolicyOptions} request.options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.get_iam_policy.js - * region_tag:datacatalog_v1_generated_DataCatalog_GetIamPolicy_async - */ - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined - ] - >; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.getIamPolicy(request, options, callback); - } - /** - * Gets your permissions on a resource. - * - * Returns an empty set of permissions if the resource doesn't exist. - * - * Supported resources are: - * - * - Tag templates - * - Entry groups - * - * Note: This method gets policies only within Data Catalog and can't be - * used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any - * external Google Cloud Platform resources ingested into Data Catalog. - * - * No Google IAM permissions are required to call this method. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.test_iam_permissions.js - * region_tag:datacatalog_v1_generated_DataCatalog_TestIamPermissions_async - */ - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined - ] - >; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } - - /** - * Searches Data Catalog for multiple resources like entries and tags that - * match a query. - * - * This is a [Custom Method] - * (https://cloud.google.com/apis/design/custom_methods) that doesn't return - * all information on a resource, only its ID and high level fields. To get - * more information, you can subsequently call specific get methods. - * - * Note: Data Catalog search queries don't guarantee full recall. Results - * that match your query might not be returned, even in subsequent - * result pages. Additionally, returned (and not returned) results can vary - * if you repeat search queries. - * - * For more information, see [Data Catalog search syntax] - * (https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} request.scope - * Required. The scope of this search request. - * - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - * @param {string} [request.query] - * Optional. The query string with a minimum of 3 characters and specific syntax. - * For more information, see - * [Data Catalog search - * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * - * A query string can be a simple `xyz` or qualified by predicates: - * - * * `name:x` - * * `column:y` - * * `description:z` - * @param {number} request.pageSize - * Number of results to return in a single search page. - * - * Can't be negative or 0, defaults to 10 in this case. - * The maximum number is 1000. If exceeded, throws an "invalid argument" - * exception. - * @param {string} [request.pageToken] - * Optional. Pagination token that, if specified, returns the next page of search - * results. If empty, returns the first page. - * - * This token is returned in the {@link google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token} - * field of the response to a previous - * {@link google.cloud.datacatalog.v1.DataCatalog.SearchCatalog|SearchCatalogRequest} - * call. - * @param {string} request.orderBy - * Specifies the order of results. - * - * Currently supported case-sensitive values are: - * - * * `relevance` that can only be descending - * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default - * * `default` that can only be descending - * - * If this parameter is omitted, it defaults to the descending `relevance`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [SearchCatalogResult]{@link google.cloud.datacatalog.v1.SearchCatalogResult}. - * 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 `searchCatalogAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - searchCatalog( - request?: protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ISearchCatalogResult[], - protos.google.cloud.datacatalog.v1.ISearchCatalogRequest | null, - protos.google.cloud.datacatalog.v1.ISearchCatalogResponse - ] - >; - searchCatalog( - request: protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - | protos.google.cloud.datacatalog.v1.ISearchCatalogResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.ISearchCatalogResult - > - ): void; - searchCatalog( - request: protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - | protos.google.cloud.datacatalog.v1.ISearchCatalogResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.ISearchCatalogResult - > - ): void; - searchCatalog( - request?: protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - | protos.google.cloud.datacatalog.v1.ISearchCatalogResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.ISearchCatalogResult - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - | protos.google.cloud.datacatalog.v1.ISearchCatalogResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.ISearchCatalogResult - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ISearchCatalogResult[], - protos.google.cloud.datacatalog.v1.ISearchCatalogRequest | null, - protos.google.cloud.datacatalog.v1.ISearchCatalogResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); - return this.innerApiCalls.searchCatalog(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 {google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} request.scope - * Required. The scope of this search request. - * - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - * @param {string} [request.query] - * Optional. The query string with a minimum of 3 characters and specific syntax. - * For more information, see - * [Data Catalog search - * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * - * A query string can be a simple `xyz` or qualified by predicates: - * - * * `name:x` - * * `column:y` - * * `description:z` - * @param {number} request.pageSize - * Number of results to return in a single search page. - * - * Can't be negative or 0, defaults to 10 in this case. - * The maximum number is 1000. If exceeded, throws an "invalid argument" - * exception. - * @param {string} [request.pageToken] - * Optional. Pagination token that, if specified, returns the next page of search - * results. If empty, returns the first page. - * - * This token is returned in the {@link google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token} - * field of the response to a previous - * {@link google.cloud.datacatalog.v1.DataCatalog.SearchCatalog|SearchCatalogRequest} - * call. - * @param {string} request.orderBy - * Specifies the order of results. - * - * Currently supported case-sensitive values are: - * - * * `relevance` that can only be descending - * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default - * * `default` that can only be descending - * - * If this parameter is omitted, it defaults to the descending `relevance`. - * @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 [SearchCatalogResult]{@link google.cloud.datacatalog.v1.SearchCatalogResult} 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 `searchCatalogAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - searchCatalogStream( - request?: protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - options?: CallOptions - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['searchCatalog']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.searchCatalog.createStream( - this.innerApiCalls.searchCatalog as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `searchCatalog`, 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 {google.cloud.datacatalog.v1.SearchCatalogRequest.Scope} request.scope - * Required. The scope of this search request. - * - * The `scope` is invalid if `include_org_ids`, `include_project_ids` are - * empty AND `include_gcp_public_datasets` is set to `false`. In this case, - * the request returns an error. - * @param {string} [request.query] - * Optional. The query string with a minimum of 3 characters and specific syntax. - * For more information, see - * [Data Catalog search - * syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). - * - * An empty query string returns all data assets (in the specified scope) - * that you have access to. - * - * A query string can be a simple `xyz` or qualified by predicates: - * - * * `name:x` - * * `column:y` - * * `description:z` - * @param {number} request.pageSize - * Number of results to return in a single search page. - * - * Can't be negative or 0, defaults to 10 in this case. - * The maximum number is 1000. If exceeded, throws an "invalid argument" - * exception. - * @param {string} [request.pageToken] - * Optional. Pagination token that, if specified, returns the next page of search - * results. If empty, returns the first page. - * - * This token is returned in the {@link google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token} - * field of the response to a previous - * {@link google.cloud.datacatalog.v1.DataCatalog.SearchCatalog|SearchCatalogRequest} - * call. - * @param {string} request.orderBy - * Specifies the order of results. - * - * Currently supported case-sensitive values are: - * - * * `relevance` that can only be descending - * * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default - * * `default` that can only be descending - * - * If this parameter is omitted, it defaults to the descending `relevance`. - * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [SearchCatalogResult]{@link google.cloud.datacatalog.v1.SearchCatalogResult}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.search_catalog.js - * region_tag:datacatalog_v1_generated_DataCatalog_SearchCatalog_async - */ - searchCatalogAsync( - request?: protos.google.cloud.datacatalog.v1.ISearchCatalogRequest, - options?: CallOptions - ): AsyncIterable { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['searchCatalog']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.searchCatalog.asyncIterate( - this.innerApiCalls['searchCatalog'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists entry groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the location that contains the entry groups to list. - * - * Can be provided as a URL. - * @param {number} [request.pageSize] - * Optional. The maximum number of items to return. - * - * Default is 10. Maximum limit is 1000. - * Throws an invalid argument if `page_size` is greater than 1000. - * @param {string} [request.pageToken] - * Optional. Pagination token that specifies the next page to return. - * If empty, returns the first page. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [EntryGroup]{@link google.cloud.datacatalog.v1.EntryGroup}. - * 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 `listEntryGroupsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listEntryGroups( - request?: protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryGroup[], - protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest | null, - protos.google.cloud.datacatalog.v1.IListEntryGroupsResponse - ] - >; - listEntryGroups( - request: protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - | protos.google.cloud.datacatalog.v1.IListEntryGroupsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IEntryGroup - > - ): void; - listEntryGroups( - request: protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - | protos.google.cloud.datacatalog.v1.IListEntryGroupsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IEntryGroup - > - ): void; - listEntryGroups( - request?: protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - | protos.google.cloud.datacatalog.v1.IListEntryGroupsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IEntryGroup - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - | protos.google.cloud.datacatalog.v1.IListEntryGroupsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IEntryGroup - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntryGroup[], - protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest | null, - protos.google.cloud.datacatalog.v1.IListEntryGroupsResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listEntryGroups(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 name of the location that contains the entry groups to list. - * - * Can be provided as a URL. - * @param {number} [request.pageSize] - * Optional. The maximum number of items to return. - * - * Default is 10. Maximum limit is 1000. - * Throws an invalid argument if `page_size` is greater than 1000. - * @param {string} [request.pageToken] - * Optional. Pagination token that specifies the next page to return. - * If empty, returns the first page. - * @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 [EntryGroup]{@link google.cloud.datacatalog.v1.EntryGroup} 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 `listEntryGroupsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listEntryGroupsStream( - request?: protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - 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['listEntryGroups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntryGroups.createStream( - this.innerApiCalls.listEntryGroups as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listEntryGroups`, 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 name of the location that contains the entry groups to list. - * - * Can be provided as a URL. - * @param {number} [request.pageSize] - * Optional. The maximum number of items to return. - * - * Default is 10. Maximum limit is 1000. - * Throws an invalid argument if `page_size` is greater than 1000. - * @param {string} [request.pageToken] - * Optional. Pagination token that specifies the next page to return. - * If empty, returns the first page. - * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [EntryGroup]{@link google.cloud.datacatalog.v1.EntryGroup}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.list_entry_groups.js - * region_tag:datacatalog_v1_generated_DataCatalog_ListEntryGroups_async - */ - listEntryGroupsAsync( - request?: protos.google.cloud.datacatalog.v1.IListEntryGroupsRequest, - 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['listEntryGroups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntryGroups.asyncIterate( - this.innerApiCalls['listEntryGroups'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists entries. - * - * Note: Currently, this method can list only custom entries. - * To get a list of both custom and automatically created entries, use - * {@link google.cloud.datacatalog.v1.DataCatalog.SearchCatalog|SearchCatalog}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the entry group that contains the entries to list. - * - * Can be provided in URL format. - * @param {number} request.pageSize - * The maximum number of items to return. Default is 10. Maximum limit is - * 1000. Throws an invalid argument if `page_size` is more than 1000. - * @param {string} request.pageToken - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * @param {google.protobuf.FieldMask} request.readMask - * The fields to return for each entry. If empty or omitted, all - * fields are returned. - * - * For example, to return a list of entries with only the `name` field, - * set `read_mask` to only one path with the `name` value. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Entry]{@link google.cloud.datacatalog.v1.Entry}. - * 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 `listEntriesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listEntries( - request?: protos.google.cloud.datacatalog.v1.IListEntriesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry[], - protos.google.cloud.datacatalog.v1.IListEntriesRequest | null, - protos.google.cloud.datacatalog.v1.IListEntriesResponse - ] - >; - listEntries( - request: protos.google.cloud.datacatalog.v1.IListEntriesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListEntriesRequest, - | protos.google.cloud.datacatalog.v1.IListEntriesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IEntry - > - ): void; - listEntries( - request: protos.google.cloud.datacatalog.v1.IListEntriesRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListEntriesRequest, - | protos.google.cloud.datacatalog.v1.IListEntriesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IEntry - > - ): void; - listEntries( - request?: protos.google.cloud.datacatalog.v1.IListEntriesRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1.IListEntriesRequest, - | protos.google.cloud.datacatalog.v1.IListEntriesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IEntry - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListEntriesRequest, - | protos.google.cloud.datacatalog.v1.IListEntriesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IEntry - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IEntry[], - protos.google.cloud.datacatalog.v1.IListEntriesRequest | null, - protos.google.cloud.datacatalog.v1.IListEntriesResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listEntries(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 name of the entry group that contains the entries to list. - * - * Can be provided in URL format. - * @param {number} request.pageSize - * The maximum number of items to return. Default is 10. Maximum limit is - * 1000. Throws an invalid argument if `page_size` is more than 1000. - * @param {string} request.pageToken - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * @param {google.protobuf.FieldMask} request.readMask - * The fields to return for each entry. If empty or omitted, all - * fields are returned. - * - * For example, to return a list of entries with only the `name` field, - * set `read_mask` to only one path with the `name` value. - * @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 [Entry]{@link google.cloud.datacatalog.v1.Entry} 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 `listEntriesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listEntriesStream( - request?: protos.google.cloud.datacatalog.v1.IListEntriesRequest, - 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['listEntries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntries.createStream( - this.innerApiCalls.listEntries as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listEntries`, 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 name of the entry group that contains the entries to list. - * - * Can be provided in URL format. - * @param {number} request.pageSize - * The maximum number of items to return. Default is 10. Maximum limit is - * 1000. Throws an invalid argument if `page_size` is more than 1000. - * @param {string} request.pageToken - * Pagination token that specifies the next page to return. If empty, the - * first page is returned. - * @param {google.protobuf.FieldMask} request.readMask - * The fields to return for each entry. If empty or omitted, all - * fields are returned. - * - * For example, to return a list of entries with only the `name` field, - * set `read_mask` to only one path with the `name` value. - * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [Entry]{@link google.cloud.datacatalog.v1.Entry}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.list_entries.js - * region_tag:datacatalog_v1_generated_DataCatalog_ListEntries_async - */ - listEntriesAsync( - request?: protos.google.cloud.datacatalog.v1.IListEntriesRequest, - 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['listEntries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntries.asyncIterate( - this.innerApiCalls['listEntries'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists tags assigned to an {@link google.cloud.datacatalog.v1.Entry|Entry}. - * The {@link google.cloud.datacatalog.v1.Tag.column|columns} in the response are - * lowercased. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the Data Catalog resource to list the tags of. - * - * The resource can be an {@link google.cloud.datacatalog.v1.Entry|Entry} - * or an {@link google.cloud.datacatalog.v1.EntryGroup|EntryGroup} - * (without `/entries/{entries}` at the end). - * @param {number} request.pageSize - * The maximum number of tags to return. Default is 10. Maximum limit is 1000. - * @param {string} request.pageToken - * Pagination token that specifies the next page to return. If empty, the - * first page is 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 [Tag]{@link google.cloud.datacatalog.v1.Tag}. - * 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 `listTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listTags( - request?: protos.google.cloud.datacatalog.v1.IListTagsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITag[], - protos.google.cloud.datacatalog.v1.IListTagsRequest | null, - protos.google.cloud.datacatalog.v1.IListTagsResponse - ] - >; - listTags( - request: protos.google.cloud.datacatalog.v1.IListTagsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListTagsRequest, - protos.google.cloud.datacatalog.v1.IListTagsResponse | null | undefined, - protos.google.cloud.datacatalog.v1.ITag - > - ): void; - listTags( - request: protos.google.cloud.datacatalog.v1.IListTagsRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListTagsRequest, - protos.google.cloud.datacatalog.v1.IListTagsResponse | null | undefined, - protos.google.cloud.datacatalog.v1.ITag - > - ): void; - listTags( - request?: protos.google.cloud.datacatalog.v1.IListTagsRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1.IListTagsRequest, - | protos.google.cloud.datacatalog.v1.IListTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.ITag - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListTagsRequest, - protos.google.cloud.datacatalog.v1.IListTagsResponse | null | undefined, - protos.google.cloud.datacatalog.v1.ITag - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITag[], - protos.google.cloud.datacatalog.v1.IListTagsRequest | null, - protos.google.cloud.datacatalog.v1.IListTagsResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listTags(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 name of the Data Catalog resource to list the tags of. - * - * The resource can be an {@link google.cloud.datacatalog.v1.Entry|Entry} - * or an {@link google.cloud.datacatalog.v1.EntryGroup|EntryGroup} - * (without `/entries/{entries}` at the end). - * @param {number} request.pageSize - * The maximum number of tags to return. Default is 10. Maximum limit is 1000. - * @param {string} request.pageToken - * Pagination token that specifies the next page to return. If empty, the - * first page is 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 [Tag]{@link google.cloud.datacatalog.v1.Tag} 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 `listTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listTagsStream( - request?: protos.google.cloud.datacatalog.v1.IListTagsRequest, - 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['listTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTags.createStream( - this.innerApiCalls.listTags as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listTags`, 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 name of the Data Catalog resource to list the tags of. - * - * The resource can be an {@link google.cloud.datacatalog.v1.Entry|Entry} - * or an {@link google.cloud.datacatalog.v1.EntryGroup|EntryGroup} - * (without `/entries/{entries}` at the end). - * @param {number} request.pageSize - * The maximum number of tags to return. Default is 10. Maximum limit is 1000. - * @param {string} request.pageToken - * Pagination token that specifies the next page to return. If empty, the - * first page is 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [Tag]{@link google.cloud.datacatalog.v1.Tag}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/data_catalog.list_tags.js - * region_tag:datacatalog_v1_generated_DataCatalog_ListTags_async - */ - listTagsAsync( - request?: protos.google.cloud.datacatalog.v1.IListTagsRequest, - 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['listTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTags.asyncIterate( - this.innerApiCalls['listTags'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified entry resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @returns {string} Resource name string. - */ - entryPath( - project: string, - location: string, - entryGroup: string, - entry: string - ) { - return this.pathTemplates.entryPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - }); - } - - /** - * Parse the project from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).project; - } - - /** - * Parse the location from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).location; - } - - /** - * Parse the entry_group from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry_group; - } - - /** - * Parse the entry from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry; - } - - /** - * Return a fully-qualified entryGroup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @returns {string} Resource name string. - */ - entryGroupPath(project: string, location: string, entryGroup: string) { - return this.pathTemplates.entryGroupPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - }); - } - - /** - * Parse the project from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .project; - } - - /** - * Parse the location from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .location; - } - - /** - * Parse the entry_group from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .entry_group; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project: string, location: string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified policyTag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @param {string} policy_tag - * @returns {string} Resource name string. - */ - policyTagPath( - project: string, - location: string, - taxonomy: string, - policyTag: string - ) { - return this.pathTemplates.policyTagPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - policy_tag: policyTag, - }); - } - - /** - * Parse the project from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .project; - } - - /** - * Parse the location from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .location; - } - - /** - * Parse the taxonomy from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .taxonomy; - } - - /** - * Parse the policy_tag from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the policy_tag. - */ - matchPolicyTagFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .policy_tag; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project: string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified tag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @param {string} tag - * @returns {string} Resource name string. - */ - tagPath( - project: string, - location: string, - entryGroup: string, - entry: string, - tag: string - ) { - return this.pathTemplates.tagPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - tag: tag, - }); - } - - /** - * Parse the project from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).project; - } - - /** - * Parse the location from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).location; - } - - /** - * Parse the entry_group from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry_group; - } - - /** - * Parse the entry from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry; - } - - /** - * Parse the tag from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the tag. - */ - matchTagFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).tag; - } - - /** - * Return a fully-qualified tagTemplate resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @returns {string} Resource name string. - */ - tagTemplatePath(project: string, location: string, tagTemplate: string) { - return this.pathTemplates.tagTemplatePathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - }); - } - - /** - * Parse the project from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .project; - } - - /** - * Parse the location from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .location; - } - - /** - * Parse the tag_template from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .tag_template; - } - - /** - * Return a fully-qualified tagTemplateField resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @param {string} field - * @returns {string} Resource name string. - */ - tagTemplateFieldPath( - project: string, - location: string, - tagTemplate: string, - field: string - ) { - return this.pathTemplates.tagTemplateFieldPathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - field: field, - }); - } - - /** - * Parse the project from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).project; - } - - /** - * Parse the location from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).location; - } - - /** - * Parse the tag_template from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).tag_template; - } - - /** - * Parse the field from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the field. - */ - matchFieldFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).field; - } - - /** - * Return a fully-qualified tagTemplateFieldEnumValue resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @param {string} tag_template_field_id - * @param {string} enum_value_display_name - * @returns {string} Resource name string. - */ - tagTemplateFieldEnumValuePath( - project: string, - location: string, - tagTemplate: string, - tagTemplateFieldId: string, - enumValueDisplayName: string - ) { - return this.pathTemplates.tagTemplateFieldEnumValuePathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - tag_template_field_id: tagTemplateFieldId, - enum_value_display_name: enumValueDisplayName, - }); - } - - /** - * Parse the project from TagTemplateFieldEnumValue resource. - * - * @param {string} tagTemplateFieldEnumValueName - * A fully-qualified path representing TagTemplateFieldEnumValue resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateFieldEnumValueName( - tagTemplateFieldEnumValueName: string - ) { - return this.pathTemplates.tagTemplateFieldEnumValuePathTemplate.match( - tagTemplateFieldEnumValueName - ).project; - } - - /** - * Parse the location from TagTemplateFieldEnumValue resource. - * - * @param {string} tagTemplateFieldEnumValueName - * A fully-qualified path representing TagTemplateFieldEnumValue resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateFieldEnumValueName( - tagTemplateFieldEnumValueName: string - ) { - return this.pathTemplates.tagTemplateFieldEnumValuePathTemplate.match( - tagTemplateFieldEnumValueName - ).location; - } - - /** - * Parse the tag_template from TagTemplateFieldEnumValue resource. - * - * @param {string} tagTemplateFieldEnumValueName - * A fully-qualified path representing TagTemplateFieldEnumValue resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateFieldEnumValueName( - tagTemplateFieldEnumValueName: string - ) { - return this.pathTemplates.tagTemplateFieldEnumValuePathTemplate.match( - tagTemplateFieldEnumValueName - ).tag_template; - } - - /** - * Parse the tag_template_field_id from TagTemplateFieldEnumValue resource. - * - * @param {string} tagTemplateFieldEnumValueName - * A fully-qualified path representing TagTemplateFieldEnumValue resource. - * @returns {string} A string representing the tag_template_field_id. - */ - matchTagTemplateFieldIdFromTagTemplateFieldEnumValueName( - tagTemplateFieldEnumValueName: string - ) { - return this.pathTemplates.tagTemplateFieldEnumValuePathTemplate.match( - tagTemplateFieldEnumValueName - ).tag_template_field_id; - } - - /** - * Parse the enum_value_display_name from TagTemplateFieldEnumValue resource. - * - * @param {string} tagTemplateFieldEnumValueName - * A fully-qualified path representing TagTemplateFieldEnumValue resource. - * @returns {string} A string representing the enum_value_display_name. - */ - matchEnumValueDisplayNameFromTagTemplateFieldEnumValueName( - tagTemplateFieldEnumValueName: string - ) { - return this.pathTemplates.tagTemplateFieldEnumValuePathTemplate.match( - tagTemplateFieldEnumValueName - ).enum_value_display_name; - } - - /** - * Return a fully-qualified taxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @returns {string} Resource name string. - */ - taxonomyPath(project: string, location: string, taxonomy: string) { - return this.pathTemplates.taxonomyPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - }); - } - - /** - * Parse the project from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).project; - } - - /** - * Parse the location from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).location; - } - - /** - * Parse the taxonomy from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).taxonomy; - } - - /** - * 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.dataCatalogStub && !this._terminated) { - return this.dataCatalogStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/src/v1/data_catalog_client_config.json b/src/v1/data_catalog_client_config.json deleted file mode 100644 index c1f90ae8..00000000 --- a/src/v1/data_catalog_client_config.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1.DataCatalog": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "SearchCatalog": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "CreateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "UpdateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListEntryGroups": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "CreateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEntry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetEntry": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "LookupEntry": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "ListEntries": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "ModifyEntryOverview": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ModifyEntryContacts": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RenameTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RenameTagTemplateFieldEnumValue": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListTags": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "StarEntry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UnstarEntry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/src/v1/data_catalog_proto_list.json b/src/v1/data_catalog_proto_list.json deleted file mode 100644 index c86ea1d1..00000000 --- a/src/v1/data_catalog_proto_list.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - "../../protos/google/cloud/datacatalog/v1/bigquery.proto", - "../../protos/google/cloud/datacatalog/v1/common.proto", - "../../protos/google/cloud/datacatalog/v1/data_source.proto", - "../../protos/google/cloud/datacatalog/v1/datacatalog.proto", - "../../protos/google/cloud/datacatalog/v1/dataplex_spec.proto", - "../../protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto", - "../../protos/google/cloud/datacatalog/v1/physical_schema.proto", - "../../protos/google/cloud/datacatalog/v1/policytagmanager.proto", - "../../protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto", - "../../protos/google/cloud/datacatalog/v1/schema.proto", - "../../protos/google/cloud/datacatalog/v1/search.proto", - "../../protos/google/cloud/datacatalog/v1/table_spec.proto", - "../../protos/google/cloud/datacatalog/v1/tags.proto", - "../../protos/google/cloud/datacatalog/v1/timestamps.proto", - "../../protos/google/cloud/datacatalog/v1/usage.proto" -] diff --git a/src/v1/gapic_metadata.json b/src/v1/gapic_metadata.json deleted file mode 100644 index c7eca655..00000000 --- a/src/v1/gapic_metadata.json +++ /dev/null @@ -1,555 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.datacatalog.v1", - "libraryPackage": "@google-cloud/datacatalog", - "services": { - "DataCatalog": { - "clients": { - "grpc": { - "libraryClient": "DataCatalogClient", - "rpcs": { - "CreateEntryGroup": { - "methods": [ - "createEntryGroup" - ] - }, - "GetEntryGroup": { - "methods": [ - "getEntryGroup" - ] - }, - "UpdateEntryGroup": { - "methods": [ - "updateEntryGroup" - ] - }, - "DeleteEntryGroup": { - "methods": [ - "deleteEntryGroup" - ] - }, - "CreateEntry": { - "methods": [ - "createEntry" - ] - }, - "UpdateEntry": { - "methods": [ - "updateEntry" - ] - }, - "DeleteEntry": { - "methods": [ - "deleteEntry" - ] - }, - "GetEntry": { - "methods": [ - "getEntry" - ] - }, - "LookupEntry": { - "methods": [ - "lookupEntry" - ] - }, - "ModifyEntryOverview": { - "methods": [ - "modifyEntryOverview" - ] - }, - "ModifyEntryContacts": { - "methods": [ - "modifyEntryContacts" - ] - }, - "CreateTagTemplate": { - "methods": [ - "createTagTemplate" - ] - }, - "GetTagTemplate": { - "methods": [ - "getTagTemplate" - ] - }, - "UpdateTagTemplate": { - "methods": [ - "updateTagTemplate" - ] - }, - "DeleteTagTemplate": { - "methods": [ - "deleteTagTemplate" - ] - }, - "CreateTagTemplateField": { - "methods": [ - "createTagTemplateField" - ] - }, - "UpdateTagTemplateField": { - "methods": [ - "updateTagTemplateField" - ] - }, - "RenameTagTemplateField": { - "methods": [ - "renameTagTemplateField" - ] - }, - "RenameTagTemplateFieldEnumValue": { - "methods": [ - "renameTagTemplateFieldEnumValue" - ] - }, - "DeleteTagTemplateField": { - "methods": [ - "deleteTagTemplateField" - ] - }, - "CreateTag": { - "methods": [ - "createTag" - ] - }, - "UpdateTag": { - "methods": [ - "updateTag" - ] - }, - "DeleteTag": { - "methods": [ - "deleteTag" - ] - }, - "StarEntry": { - "methods": [ - "starEntry" - ] - }, - "UnstarEntry": { - "methods": [ - "unstarEntry" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "SearchCatalog": { - "methods": [ - "searchCatalog", - "searchCatalogStream", - "searchCatalogAsync" - ] - }, - "ListEntryGroups": { - "methods": [ - "listEntryGroups", - "listEntryGroupsStream", - "listEntryGroupsAsync" - ] - }, - "ListEntries": { - "methods": [ - "listEntries", - "listEntriesStream", - "listEntriesAsync" - ] - }, - "ListTags": { - "methods": [ - "listTags", - "listTagsStream", - "listTagsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "DataCatalogClient", - "rpcs": { - "CreateEntryGroup": { - "methods": [ - "createEntryGroup" - ] - }, - "GetEntryGroup": { - "methods": [ - "getEntryGroup" - ] - }, - "UpdateEntryGroup": { - "methods": [ - "updateEntryGroup" - ] - }, - "DeleteEntryGroup": { - "methods": [ - "deleteEntryGroup" - ] - }, - "CreateEntry": { - "methods": [ - "createEntry" - ] - }, - "UpdateEntry": { - "methods": [ - "updateEntry" - ] - }, - "DeleteEntry": { - "methods": [ - "deleteEntry" - ] - }, - "GetEntry": { - "methods": [ - "getEntry" - ] - }, - "LookupEntry": { - "methods": [ - "lookupEntry" - ] - }, - "ModifyEntryOverview": { - "methods": [ - "modifyEntryOverview" - ] - }, - "ModifyEntryContacts": { - "methods": [ - "modifyEntryContacts" - ] - }, - "CreateTagTemplate": { - "methods": [ - "createTagTemplate" - ] - }, - "GetTagTemplate": { - "methods": [ - "getTagTemplate" - ] - }, - "UpdateTagTemplate": { - "methods": [ - "updateTagTemplate" - ] - }, - "DeleteTagTemplate": { - "methods": [ - "deleteTagTemplate" - ] - }, - "CreateTagTemplateField": { - "methods": [ - "createTagTemplateField" - ] - }, - "UpdateTagTemplateField": { - "methods": [ - "updateTagTemplateField" - ] - }, - "RenameTagTemplateField": { - "methods": [ - "renameTagTemplateField" - ] - }, - "RenameTagTemplateFieldEnumValue": { - "methods": [ - "renameTagTemplateFieldEnumValue" - ] - }, - "DeleteTagTemplateField": { - "methods": [ - "deleteTagTemplateField" - ] - }, - "CreateTag": { - "methods": [ - "createTag" - ] - }, - "UpdateTag": { - "methods": [ - "updateTag" - ] - }, - "DeleteTag": { - "methods": [ - "deleteTag" - ] - }, - "StarEntry": { - "methods": [ - "starEntry" - ] - }, - "UnstarEntry": { - "methods": [ - "unstarEntry" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "SearchCatalog": { - "methods": [ - "searchCatalog", - "searchCatalogStream", - "searchCatalogAsync" - ] - }, - "ListEntryGroups": { - "methods": [ - "listEntryGroups", - "listEntryGroupsStream", - "listEntryGroupsAsync" - ] - }, - "ListEntries": { - "methods": [ - "listEntries", - "listEntriesStream", - "listEntriesAsync" - ] - }, - "ListTags": { - "methods": [ - "listTags", - "listTagsStream", - "listTagsAsync" - ] - } - } - } - } - }, - "PolicyTagManager": { - "clients": { - "grpc": { - "libraryClient": "PolicyTagManagerClient", - "rpcs": { - "CreateTaxonomy": { - "methods": [ - "createTaxonomy" - ] - }, - "DeleteTaxonomy": { - "methods": [ - "deleteTaxonomy" - ] - }, - "UpdateTaxonomy": { - "methods": [ - "updateTaxonomy" - ] - }, - "GetTaxonomy": { - "methods": [ - "getTaxonomy" - ] - }, - "CreatePolicyTag": { - "methods": [ - "createPolicyTag" - ] - }, - "DeletePolicyTag": { - "methods": [ - "deletePolicyTag" - ] - }, - "UpdatePolicyTag": { - "methods": [ - "updatePolicyTag" - ] - }, - "GetPolicyTag": { - "methods": [ - "getPolicyTag" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "ListTaxonomies": { - "methods": [ - "listTaxonomies", - "listTaxonomiesStream", - "listTaxonomiesAsync" - ] - }, - "ListPolicyTags": { - "methods": [ - "listPolicyTags", - "listPolicyTagsStream", - "listPolicyTagsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "PolicyTagManagerClient", - "rpcs": { - "CreateTaxonomy": { - "methods": [ - "createTaxonomy" - ] - }, - "DeleteTaxonomy": { - "methods": [ - "deleteTaxonomy" - ] - }, - "UpdateTaxonomy": { - "methods": [ - "updateTaxonomy" - ] - }, - "GetTaxonomy": { - "methods": [ - "getTaxonomy" - ] - }, - "CreatePolicyTag": { - "methods": [ - "createPolicyTag" - ] - }, - "DeletePolicyTag": { - "methods": [ - "deletePolicyTag" - ] - }, - "UpdatePolicyTag": { - "methods": [ - "updatePolicyTag" - ] - }, - "GetPolicyTag": { - "methods": [ - "getPolicyTag" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "ListTaxonomies": { - "methods": [ - "listTaxonomies", - "listTaxonomiesStream", - "listTaxonomiesAsync" - ] - }, - "ListPolicyTags": { - "methods": [ - "listPolicyTags", - "listPolicyTagsStream", - "listPolicyTagsAsync" - ] - } - } - } - } - }, - "PolicyTagManagerSerialization": { - "clients": { - "grpc": { - "libraryClient": "PolicyTagManagerSerializationClient", - "rpcs": { - "ReplaceTaxonomy": { - "methods": [ - "replaceTaxonomy" - ] - }, - "ImportTaxonomies": { - "methods": [ - "importTaxonomies" - ] - }, - "ExportTaxonomies": { - "methods": [ - "exportTaxonomies" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "PolicyTagManagerSerializationClient", - "rpcs": { - "ReplaceTaxonomy": { - "methods": [ - "replaceTaxonomy" - ] - }, - "ImportTaxonomies": { - "methods": [ - "importTaxonomies" - ] - }, - "ExportTaxonomies": { - "methods": [ - "exportTaxonomies" - ] - } - } - } - } - } - } -} diff --git a/src/v1/index.ts b/src/v1/index.ts deleted file mode 100644 index 29079e30..00000000 --- a/src/v1/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 {DataCatalogClient} from './data_catalog_client'; -export {PolicyTagManagerClient} from './policy_tag_manager_client'; -export {PolicyTagManagerSerializationClient} from './policy_tag_manager_serialization_client'; diff --git a/src/v1/policy_tag_manager_client.ts b/src/v1/policy_tag_manager_client.ts deleted file mode 100644 index dae436f5..00000000 --- a/src/v1/policy_tag_manager_client.ts +++ /dev/null @@ -1,2334 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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/policy_tag_manager_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './policy_tag_manager_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Policy Tag Manager API service allows you to manage your policy tags and - * taxonomies. - * - * Policy tags are used to tag BigQuery columns and apply additional access - * control policies. A taxonomy is a hierarchical grouping of policy tags that - * classify data along a common axis. - * @class - * @memberof v1 - */ -export class PolicyTagManagerClient { - 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}; - 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}; - policyTagManagerStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of PolicyTagManagerClient. - * - * @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 | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. - * 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 PolicyTagManagerClient({fallback: 'rest'}, gax); - * ``` - */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback - ) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof PolicyTagManagerClient; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.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); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.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 = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { - 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 = { - entryPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}' - ), - entryGroupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - policyTagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - tagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}' - ), - tagTemplatePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}' - ), - tagTemplateFieldPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}' - ), - taxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}' - ), - }; - - // 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 = { - listTaxonomies: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'taxonomies' - ), - listPolicyTags: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'policyTags' - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.datacatalog.v1.PolicyTagManager', - 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.policyTagManagerStub) { - return this.policyTagManagerStub; - } - - // Put together the "service stub" for - // google.cloud.datacatalog.v1.PolicyTagManager. - this.policyTagManagerStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.datacatalog.v1.PolicyTagManager' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.datacatalog.v1.PolicyTagManager, - 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 policyTagManagerStubMethods = [ - 'createTaxonomy', - 'deleteTaxonomy', - 'updateTaxonomy', - 'listTaxonomies', - 'getTaxonomy', - 'createPolicyTag', - 'deletePolicyTag', - 'updatePolicyTag', - 'listPolicyTags', - 'getPolicyTag', - 'getIamPolicy', - 'setIamPolicy', - 'testIamPermissions', - ]; - for (const methodName of policyTagManagerStubMethods) { - const callPromise = this.policyTagManagerStub.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.policyTagManagerStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - return 'datacatalog.googleapis.com'; - } - - /** - * 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 -- - // ------------------- - /** - * Creates a taxonomy in a specified project. - * - * The taxonomy is initially empty, that is, it doesn't contain policy tags. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the project that the taxonomy will belong to. - * @param {google.cloud.datacatalog.v1.Taxonomy} request.taxonomy - * The taxonomy 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 [Taxonomy]{@link google.cloud.datacatalog.v1.Taxonomy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.create_taxonomy.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_CreateTaxonomy_async - */ - createTaxonomy( - request?: protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest | undefined, - {} | undefined - ] - >; - createTaxonomy( - request: protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTaxonomy( - request: protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTaxonomy( - request?: protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.ICreateTaxonomyRequest | 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.createTaxonomy(request, options, callback); - } - /** - * Deletes a taxonomy, including all policy tags in this - * taxonomy, their associated policies, and the policy tags references from - * BigQuery columns. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the taxonomy to delete. - * - * Note: All policy tags in this taxonomy are also deleted. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.delete_taxonomy.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_DeleteTaxonomy_async - */ - deleteTaxonomy( - request?: protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest | undefined, - {} | undefined - ] - >; - deleteTaxonomy( - request: protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTaxonomy( - request: protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTaxonomy( - request?: protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeleteTaxonomyRequest | 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.deleteTaxonomy(request, options, callback); - } - /** - * Updates a taxonomy, including its display name, - * description, and activated policy types. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1.Taxonomy} request.taxonomy - * The taxonomy to update. You can update only its description, display name, - * and activated policy types. - * @param {google.protobuf.FieldMask} request.updateMask - * Specifies fields to update. If not set, defaults to all fields you can - * update. - * - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Taxonomy]{@link google.cloud.datacatalog.v1.Taxonomy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.update_taxonomy.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_UpdateTaxonomy_async - */ - updateTaxonomy( - request?: protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest | undefined, - {} | undefined - ] - >; - updateTaxonomy( - request: protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTaxonomy( - request: protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTaxonomy( - request?: protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.IUpdateTaxonomyRequest | 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({ - 'taxonomy.name': request.taxonomy!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateTaxonomy(request, options, callback); - } - /** - * Gets a taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the taxonomy to get. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Taxonomy]{@link google.cloud.datacatalog.v1.Taxonomy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.get_taxonomy.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_GetTaxonomy_async - */ - getTaxonomy( - request?: protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | undefined, - {} | undefined - ] - >; - getTaxonomy( - request: protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | null | undefined, - {} | null | undefined - > - ): void; - getTaxonomy( - request: protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | null | undefined, - {} | null | undefined - > - ): void; - getTaxonomy( - request?: protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.IGetTaxonomyRequest | 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.getTaxonomy(request, options, callback); - } - /** - * Creates a policy tag in a taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the taxonomy that the policy tag will belong to. - * @param {google.cloud.datacatalog.v1.PolicyTag} request.policyTag - * The policy tag 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 [PolicyTag]{@link google.cloud.datacatalog.v1.PolicyTag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.create_policy_tag.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_CreatePolicyTag_async - */ - createPolicyTag( - request?: protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IPolicyTag, - protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest | undefined, - {} | undefined - ] - >; - createPolicyTag( - request: protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createPolicyTag( - request: protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createPolicyTag( - request?: protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IPolicyTag, - protos.google.cloud.datacatalog.v1.ICreatePolicyTagRequest | 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.createPolicyTag(request, options, callback); - } - /** - * Deletes a policy tag together with the following: - * - * * All of its descendant policy tags, if any - * * Policies associated with the policy tag and its descendants - * * References from BigQuery table schema of the policy tag and its - * descendants - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the policy tag to delete. - * - * Note: All of its descendant policy tags are also deleted. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.delete_policy_tag.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_DeletePolicyTag_async - */ - deletePolicyTag( - request?: protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest | undefined, - {} | undefined - ] - >; - deletePolicyTag( - request: protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deletePolicyTag( - request: protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deletePolicyTag( - request?: protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1.IDeletePolicyTagRequest | 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.deletePolicyTag(request, options, callback); - } - /** - * Updates a policy tag, including its display - * name, description, and parent policy tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1.PolicyTag} request.policyTag - * The policy tag to update. You can update only its description, display - * name, and parent policy tag fields. - * @param {google.protobuf.FieldMask} request.updateMask - * Specifies the fields to update. - * - * You can update only display name, description, and parent policy tag. - * If not set, defaults to all updatable fields. - * For more information, see [FieldMask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PolicyTag]{@link google.cloud.datacatalog.v1.PolicyTag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.update_policy_tag.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_UpdatePolicyTag_async - */ - updatePolicyTag( - request?: protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IPolicyTag, - protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest | undefined, - {} | undefined - ] - >; - updatePolicyTag( - request: protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updatePolicyTag( - request: protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updatePolicyTag( - request?: protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IPolicyTag, - protos.google.cloud.datacatalog.v1.IUpdatePolicyTagRequest | 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({ - 'policy_tag.name': request.policyTag!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updatePolicyTag(request, options, callback); - } - /** - * Gets a policy tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the policy tag. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PolicyTag]{@link google.cloud.datacatalog.v1.PolicyTag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.get_policy_tag.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_GetPolicyTag_async - */ - getPolicyTag( - request?: protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IPolicyTag, - protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest | undefined, - {} | undefined - ] - >; - getPolicyTag( - request: protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getPolicyTag( - request: protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getPolicyTag( - request?: protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IPolicyTag, - | protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IPolicyTag, - protos.google.cloud.datacatalog.v1.IGetPolicyTagRequest | 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.getPolicyTag(request, options, callback); - } - /** - * Gets the IAM policy for a policy tag or a taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.GetPolicyOptions} request.options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.get_iam_policy.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_GetIamPolicy_async - */ - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined - ] - >; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.getIamPolicy(request, options, callback); - } - /** - * Sets the IAM policy for a policy tag or a taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.Policy} request.policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param {google.protobuf.FieldMask} request.updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.set_iam_policy.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_SetIamPolicy_async - */ - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined - ] - >; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.setIamPolicy(request, options, callback); - } - /** - * Returns your permissions on a specified policy tag or - * taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.test_iam_permissions.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_TestIamPermissions_async - */ - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined - ] - >; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } - - /** - * Lists all taxonomies in a project in a particular location that you - * have a permission to view. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the project to list the taxonomies of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. If not set, defaults to 50. - * @param {string} request.pageToken - * The pagination token of the next results page. If not set, - * the first page is returned. - * - * The token is returned in the response to a previous list request. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Taxonomy]{@link google.cloud.datacatalog.v1.Taxonomy}. - * 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 `listTaxonomiesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listTaxonomies( - request?: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy[], - protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest | null, - protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse - ] - >; - listTaxonomies( - request: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - | protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.ITaxonomy - > - ): void; - listTaxonomies( - request: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - | protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.ITaxonomy - > - ): void; - listTaxonomies( - request?: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - | protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.ITaxonomy - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - | protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.ITaxonomy - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy[], - protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest | null, - protos.google.cloud.datacatalog.v1.IListTaxonomiesResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listTaxonomies(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. Resource name of the project to list the taxonomies of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. If not set, defaults to 50. - * @param {string} request.pageToken - * The pagination token of the next results page. If not set, - * the first page is returned. - * - * The token is returned in the response to a previous list request. - * @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 [Taxonomy]{@link google.cloud.datacatalog.v1.Taxonomy} 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 `listTaxonomiesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listTaxonomiesStream( - request?: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - 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['listTaxonomies']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTaxonomies.createStream( - this.innerApiCalls.listTaxonomies as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listTaxonomies`, 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. Resource name of the project to list the taxonomies of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. If not set, defaults to 50. - * @param {string} request.pageToken - * The pagination token of the next results page. If not set, - * the first page is returned. - * - * The token is returned in the response to a previous list request. - * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [Taxonomy]{@link google.cloud.datacatalog.v1.Taxonomy}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.list_taxonomies.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_ListTaxonomies_async - */ - listTaxonomiesAsync( - request?: protos.google.cloud.datacatalog.v1.IListTaxonomiesRequest, - 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['listTaxonomies']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTaxonomies.asyncIterate( - this.innerApiCalls['listTaxonomies'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all policy tags in a taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the taxonomy to list the policy tags of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. - * If not set, defaults to 50. - * @param {string} request.pageToken - * The pagination token of the next results page. If not set, returns the - * first page. - * - * The token is returned in the response to a previous list request. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PolicyTag]{@link google.cloud.datacatalog.v1.PolicyTag}. - * 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 `listPolicyTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listPolicyTags( - request?: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IPolicyTag[], - protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest | null, - protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse - ] - >; - listPolicyTags( - request: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - | protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IPolicyTag - > - ): void; - listPolicyTags( - request: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - | protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IPolicyTag - > - ): void; - listPolicyTags( - request?: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - | protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IPolicyTag - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - | protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1.IPolicyTag - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IPolicyTag[], - protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest | null, - protos.google.cloud.datacatalog.v1.IListPolicyTagsResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listPolicyTags(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. Resource name of the taxonomy to list the policy tags of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. - * If not set, defaults to 50. - * @param {string} request.pageToken - * The pagination token of the next results page. If not set, returns the - * first page. - * - * The token is returned in the response to a previous list request. - * @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 [PolicyTag]{@link google.cloud.datacatalog.v1.PolicyTag} 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 `listPolicyTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listPolicyTagsStream( - request?: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - 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['listPolicyTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPolicyTags.createStream( - this.innerApiCalls.listPolicyTags as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listPolicyTags`, 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. Resource name of the taxonomy to list the policy tags of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000 - * inclusively. - * If not set, defaults to 50. - * @param {string} request.pageToken - * The pagination token of the next results page. If not set, returns the - * first page. - * - * The token is returned in the response to a previous list request. - * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [PolicyTag]{@link google.cloud.datacatalog.v1.PolicyTag}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager.list_policy_tags.js - * region_tag:datacatalog_v1_generated_PolicyTagManager_ListPolicyTags_async - */ - listPolicyTagsAsync( - request?: protos.google.cloud.datacatalog.v1.IListPolicyTagsRequest, - 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['listPolicyTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPolicyTags.asyncIterate( - this.innerApiCalls['listPolicyTags'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified entry resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @returns {string} Resource name string. - */ - entryPath( - project: string, - location: string, - entryGroup: string, - entry: string - ) { - return this.pathTemplates.entryPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - }); - } - - /** - * Parse the project from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).project; - } - - /** - * Parse the location from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).location; - } - - /** - * Parse the entry_group from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry_group; - } - - /** - * Parse the entry from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry; - } - - /** - * Return a fully-qualified entryGroup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @returns {string} Resource name string. - */ - entryGroupPath(project: string, location: string, entryGroup: string) { - return this.pathTemplates.entryGroupPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - }); - } - - /** - * Parse the project from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .project; - } - - /** - * Parse the location from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .location; - } - - /** - * Parse the entry_group from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .entry_group; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project: string, location: string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified policyTag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @param {string} policy_tag - * @returns {string} Resource name string. - */ - policyTagPath( - project: string, - location: string, - taxonomy: string, - policyTag: string - ) { - return this.pathTemplates.policyTagPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - policy_tag: policyTag, - }); - } - - /** - * Parse the project from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .project; - } - - /** - * Parse the location from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .location; - } - - /** - * Parse the taxonomy from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .taxonomy; - } - - /** - * Parse the policy_tag from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the policy_tag. - */ - matchPolicyTagFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .policy_tag; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project: string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified tag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @param {string} tag - * @returns {string} Resource name string. - */ - tagPath( - project: string, - location: string, - entryGroup: string, - entry: string, - tag: string - ) { - return this.pathTemplates.tagPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - tag: tag, - }); - } - - /** - * Parse the project from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).project; - } - - /** - * Parse the location from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).location; - } - - /** - * Parse the entry_group from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry_group; - } - - /** - * Parse the entry from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry; - } - - /** - * Parse the tag from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the tag. - */ - matchTagFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).tag; - } - - /** - * Return a fully-qualified tagTemplate resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @returns {string} Resource name string. - */ - tagTemplatePath(project: string, location: string, tagTemplate: string) { - return this.pathTemplates.tagTemplatePathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - }); - } - - /** - * Parse the project from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .project; - } - - /** - * Parse the location from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .location; - } - - /** - * Parse the tag_template from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .tag_template; - } - - /** - * Return a fully-qualified tagTemplateField resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @param {string} field - * @returns {string} Resource name string. - */ - tagTemplateFieldPath( - project: string, - location: string, - tagTemplate: string, - field: string - ) { - return this.pathTemplates.tagTemplateFieldPathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - field: field, - }); - } - - /** - * Parse the project from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).project; - } - - /** - * Parse the location from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).location; - } - - /** - * Parse the tag_template from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).tag_template; - } - - /** - * Parse the field from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the field. - */ - matchFieldFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).field; - } - - /** - * Return a fully-qualified taxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @returns {string} Resource name string. - */ - taxonomyPath(project: string, location: string, taxonomy: string) { - return this.pathTemplates.taxonomyPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - }); - } - - /** - * Parse the project from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).project; - } - - /** - * Parse the location from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).location; - } - - /** - * Parse the taxonomy from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).taxonomy; - } - - /** - * 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.policyTagManagerStub && !this._terminated) { - return this.policyTagManagerStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/src/v1/policy_tag_manager_client_config.json b/src/v1/policy_tag_manager_client_config.json deleted file mode 100644 index 03093f81..00000000 --- a/src/v1/policy_tag_manager_client_config.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1.PolicyTagManager": { - "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": { - "CreateTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListTaxonomies": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreatePolicyTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeletePolicyTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdatePolicyTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListPolicyTags": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetPolicyTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/src/v1/policy_tag_manager_proto_list.json b/src/v1/policy_tag_manager_proto_list.json deleted file mode 100644 index c86ea1d1..00000000 --- a/src/v1/policy_tag_manager_proto_list.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - "../../protos/google/cloud/datacatalog/v1/bigquery.proto", - "../../protos/google/cloud/datacatalog/v1/common.proto", - "../../protos/google/cloud/datacatalog/v1/data_source.proto", - "../../protos/google/cloud/datacatalog/v1/datacatalog.proto", - "../../protos/google/cloud/datacatalog/v1/dataplex_spec.proto", - "../../protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto", - "../../protos/google/cloud/datacatalog/v1/physical_schema.proto", - "../../protos/google/cloud/datacatalog/v1/policytagmanager.proto", - "../../protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto", - "../../protos/google/cloud/datacatalog/v1/schema.proto", - "../../protos/google/cloud/datacatalog/v1/search.proto", - "../../protos/google/cloud/datacatalog/v1/table_spec.proto", - "../../protos/google/cloud/datacatalog/v1/tags.proto", - "../../protos/google/cloud/datacatalog/v1/timestamps.proto", - "../../protos/google/cloud/datacatalog/v1/usage.proto" -] diff --git a/src/v1/policy_tag_manager_serialization_client.ts b/src/v1/policy_tag_manager_serialization_client.ts deleted file mode 100644 index 0ded6176..00000000 --- a/src/v1/policy_tag_manager_serialization_client.ts +++ /dev/null @@ -1,1180 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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, -} from 'google-gax'; - -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -/** - * Client JSON configuration object, loaded from - * `src/v1/policy_tag_manager_serialization_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './policy_tag_manager_serialization_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Policy Tag Manager Serialization API service allows you to manipulate - * your policy tags and taxonomies in a serialized format. - * - * Taxonomy is a hierarchical group of policy tags. - * @class - * @memberof v1 - */ -export class PolicyTagManagerSerializationClient { - 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}; - 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}; - policyTagManagerSerializationStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of PolicyTagManagerSerializationClient. - * - * @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 | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. - * 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 PolicyTagManagerSerializationClient({fallback: 'rest'}, gax); - * ``` - */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback - ) { - // Ensure that options include all the required fields. - const staticMembers = this - .constructor as typeof PolicyTagManagerSerializationClient; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.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); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.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 = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { - 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 = { - entryPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}' - ), - entryGroupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - policyTagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - tagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}' - ), - tagTemplatePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}' - ), - tagTemplateFieldPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}' - ), - taxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}' - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.datacatalog.v1.PolicyTagManagerSerialization', - 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.policyTagManagerSerializationStub) { - return this.policyTagManagerSerializationStub; - } - - // Put together the "service stub" for - // google.cloud.datacatalog.v1.PolicyTagManagerSerialization. - this.policyTagManagerSerializationStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.datacatalog.v1.PolicyTagManagerSerialization' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.datacatalog.v1 - .PolicyTagManagerSerialization, - 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 policyTagManagerSerializationStubMethods = [ - 'replaceTaxonomy', - 'importTaxonomies', - 'exportTaxonomies', - ]; - for (const methodName of policyTagManagerSerializationStubMethods) { - const callPromise = this.policyTagManagerSerializationStub.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 = undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.policyTagManagerSerializationStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - return 'datacatalog.googleapis.com'; - } - - /** - * 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 -- - // ------------------- - /** - * Replaces (updates) a taxonomy and all its policy tags. - * - * The taxonomy and its entire hierarchy of policy tags must be - * represented literally by `SerializedTaxonomy` and the nested - * `SerializedPolicyTag` messages. - * - * This operation automatically does the following: - * - * - Deletes the existing policy tags that are missing from the - * `SerializedPolicyTag`. - * - Creates policy tags that don't have resource names. They are considered - * new. - * - Updates policy tags with valid resources names accordingly. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the taxonomy to update. - * @param {google.cloud.datacatalog.v1.SerializedTaxonomy} request.serializedTaxonomy - * Required. Taxonomy to update along with its child policy tags. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Taxonomy]{@link google.cloud.datacatalog.v1.Taxonomy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager_serialization.replace_taxonomy.js - * region_tag:datacatalog_v1_generated_PolicyTagManagerSerialization_ReplaceTaxonomy_async - */ - replaceTaxonomy( - request?: protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest | undefined, - {} | undefined - ] - >; - replaceTaxonomy( - request: protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - replaceTaxonomy( - request: protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - replaceTaxonomy( - request?: protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.ITaxonomy, - | protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.ITaxonomy, - protos.google.cloud.datacatalog.v1.IReplaceTaxonomyRequest | 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.replaceTaxonomy(request, options, callback); - } - /** - * Creates new taxonomies (including their policy tags) in a given project - * by importing from inlined or cross-regional sources. - * - * For a cross-regional source, new taxonomies are created by copying - * from a source in another region. - * - * For an inlined source, taxonomies and policy tags are created in bulk using - * nested protocol buffer structures. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of project that the imported taxonomies will belong to. - * @param {google.cloud.datacatalog.v1.InlineSource} request.inlineSource - * Inline source taxonomy to import. - * @param {google.cloud.datacatalog.v1.CrossRegionalSource} request.crossRegionalSource - * Cross-regional source taxonomy to import. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ImportTaxonomiesResponse]{@link google.cloud.datacatalog.v1.ImportTaxonomiesResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager_serialization.import_taxonomies.js - * region_tag:datacatalog_v1_generated_PolicyTagManagerSerialization_ImportTaxonomies_async - */ - importTaxonomies( - request?: protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IImportTaxonomiesResponse, - protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest | undefined, - {} | undefined - ] - >; - importTaxonomies( - request: protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IImportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - importTaxonomies( - request: protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IImportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - importTaxonomies( - request?: protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IImportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IImportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IImportTaxonomiesResponse, - protos.google.cloud.datacatalog.v1.IImportTaxonomiesRequest | 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.importTaxonomies(request, options, callback); - } - /** - * Exports taxonomies in the requested type and returns them, - * including their policy tags. The requested taxonomies must belong to the - * same project. - * - * This method generates `SerializedTaxonomy` protocol buffers with nested - * policy tags that can be used as input for `ImportTaxonomies` calls. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the project that the exported taxonomies belong to. - * @param {string[]} request.taxonomies - * Required. Resource names of the taxonomies to export. - * @param {boolean} request.serializedTaxonomies - * Serialized export taxonomies that contain all the policy - * tags as nested protocol buffers. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ExportTaxonomiesResponse]{@link google.cloud.datacatalog.v1.ExportTaxonomiesResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1/policy_tag_manager_serialization.export_taxonomies.js - * region_tag:datacatalog_v1_generated_PolicyTagManagerSerialization_ExportTaxonomies_async - */ - exportTaxonomies( - request?: protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IExportTaxonomiesResponse, - protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest | undefined, - {} | undefined - ] - >; - exportTaxonomies( - request: protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1.IExportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - exportTaxonomies( - request: protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1.IExportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - exportTaxonomies( - request?: protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1.IExportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1.IExportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1.IExportTaxonomiesResponse, - protos.google.cloud.datacatalog.v1.IExportTaxonomiesRequest | 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.exportTaxonomies(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified entry resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @returns {string} Resource name string. - */ - entryPath( - project: string, - location: string, - entryGroup: string, - entry: string - ) { - return this.pathTemplates.entryPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - }); - } - - /** - * Parse the project from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).project; - } - - /** - * Parse the location from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).location; - } - - /** - * Parse the entry_group from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry_group; - } - - /** - * Parse the entry from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry; - } - - /** - * Return a fully-qualified entryGroup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @returns {string} Resource name string. - */ - entryGroupPath(project: string, location: string, entryGroup: string) { - return this.pathTemplates.entryGroupPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - }); - } - - /** - * Parse the project from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .project; - } - - /** - * Parse the location from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .location; - } - - /** - * Parse the entry_group from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .entry_group; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project: string, location: string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified policyTag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @param {string} policy_tag - * @returns {string} Resource name string. - */ - policyTagPath( - project: string, - location: string, - taxonomy: string, - policyTag: string - ) { - return this.pathTemplates.policyTagPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - policy_tag: policyTag, - }); - } - - /** - * Parse the project from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .project; - } - - /** - * Parse the location from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .location; - } - - /** - * Parse the taxonomy from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .taxonomy; - } - - /** - * Parse the policy_tag from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the policy_tag. - */ - matchPolicyTagFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .policy_tag; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project: string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified tag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @param {string} tag - * @returns {string} Resource name string. - */ - tagPath( - project: string, - location: string, - entryGroup: string, - entry: string, - tag: string - ) { - return this.pathTemplates.tagPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - tag: tag, - }); - } - - /** - * Parse the project from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).project; - } - - /** - * Parse the location from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).location; - } - - /** - * Parse the entry_group from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry_group; - } - - /** - * Parse the entry from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry; - } - - /** - * Parse the tag from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the tag. - */ - matchTagFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).tag; - } - - /** - * Return a fully-qualified tagTemplate resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @returns {string} Resource name string. - */ - tagTemplatePath(project: string, location: string, tagTemplate: string) { - return this.pathTemplates.tagTemplatePathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - }); - } - - /** - * Parse the project from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .project; - } - - /** - * Parse the location from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .location; - } - - /** - * Parse the tag_template from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .tag_template; - } - - /** - * Return a fully-qualified tagTemplateField resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @param {string} field - * @returns {string} Resource name string. - */ - tagTemplateFieldPath( - project: string, - location: string, - tagTemplate: string, - field: string - ) { - return this.pathTemplates.tagTemplateFieldPathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - field: field, - }); - } - - /** - * Parse the project from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).project; - } - - /** - * Parse the location from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).location; - } - - /** - * Parse the tag_template from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).tag_template; - } - - /** - * Parse the field from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the field. - */ - matchFieldFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).field; - } - - /** - * Return a fully-qualified taxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @returns {string} Resource name string. - */ - taxonomyPath(project: string, location: string, taxonomy: string) { - return this.pathTemplates.taxonomyPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - }); - } - - /** - * Parse the project from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).project; - } - - /** - * Parse the location from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).location; - } - - /** - * Parse the taxonomy from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).taxonomy; - } - - /** - * 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.policyTagManagerSerializationStub && !this._terminated) { - return this.policyTagManagerSerializationStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/src/v1/policy_tag_manager_serialization_client_config.json b/src/v1/policy_tag_manager_serialization_client_config.json deleted file mode 100644 index 505c5d7f..00000000 --- a/src/v1/policy_tag_manager_serialization_client_config.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1.PolicyTagManagerSerialization": { - "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": { - "ReplaceTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ImportTaxonomies": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExportTaxonomies": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/src/v1/policy_tag_manager_serialization_proto_list.json b/src/v1/policy_tag_manager_serialization_proto_list.json deleted file mode 100644 index c86ea1d1..00000000 --- a/src/v1/policy_tag_manager_serialization_proto_list.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - "../../protos/google/cloud/datacatalog/v1/bigquery.proto", - "../../protos/google/cloud/datacatalog/v1/common.proto", - "../../protos/google/cloud/datacatalog/v1/data_source.proto", - "../../protos/google/cloud/datacatalog/v1/datacatalog.proto", - "../../protos/google/cloud/datacatalog/v1/dataplex_spec.proto", - "../../protos/google/cloud/datacatalog/v1/gcs_fileset_spec.proto", - "../../protos/google/cloud/datacatalog/v1/physical_schema.proto", - "../../protos/google/cloud/datacatalog/v1/policytagmanager.proto", - "../../protos/google/cloud/datacatalog/v1/policytagmanagerserialization.proto", - "../../protos/google/cloud/datacatalog/v1/schema.proto", - "../../protos/google/cloud/datacatalog/v1/search.proto", - "../../protos/google/cloud/datacatalog/v1/table_spec.proto", - "../../protos/google/cloud/datacatalog/v1/tags.proto", - "../../protos/google/cloud/datacatalog/v1/timestamps.proto", - "../../protos/google/cloud/datacatalog/v1/usage.proto" -] diff --git a/src/v1beta1/data_catalog_client.ts b/src/v1beta1/data_catalog_client.ts deleted file mode 100644 index dbfe3bb7..00000000 --- a/src/v1beta1/data_catalog_client.ts +++ /dev/null @@ -1,4275 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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/data_catalog_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './data_catalog_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Data Catalog API service allows clients to discover, understand, and manage - * their data. - * @class - * @memberof v1beta1 - */ -export class DataCatalogClient { - 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}; - 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}; - dataCatalogStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of DataCatalogClient. - * - * @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 | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. - * 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 DataCatalogClient({fallback: 'rest'}, gax); - * ``` - */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback - ) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof DataCatalogClient; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.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); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.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 = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { - 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 = { - entryPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}' - ), - entryGroupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - policyTagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - tagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}' - ), - tagTemplatePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}' - ), - tagTemplateFieldPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}' - ), - taxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}' - ), - }; - - // 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 = { - searchCatalog: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'results' - ), - listEntryGroups: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'entryGroups' - ), - listEntries: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'entries' - ), - listTags: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'tags' - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.datacatalog.v1beta1.DataCatalog', - 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.dataCatalogStub) { - return this.dataCatalogStub; - } - - // Put together the "service stub" for - // google.cloud.datacatalog.v1beta1.DataCatalog. - this.dataCatalogStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.datacatalog.v1beta1.DataCatalog' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.datacatalog.v1beta1.DataCatalog, - 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 dataCatalogStubMethods = [ - 'searchCatalog', - 'createEntryGroup', - 'updateEntryGroup', - 'getEntryGroup', - 'deleteEntryGroup', - 'listEntryGroups', - 'createEntry', - 'updateEntry', - 'deleteEntry', - 'getEntry', - 'lookupEntry', - 'listEntries', - 'createTagTemplate', - 'getTagTemplate', - 'updateTagTemplate', - 'deleteTagTemplate', - 'createTagTemplateField', - 'updateTagTemplateField', - 'renameTagTemplateField', - 'deleteTagTemplateField', - 'createTag', - 'updateTag', - 'deleteTag', - 'listTags', - 'setIamPolicy', - 'getIamPolicy', - 'testIamPermissions', - ]; - for (const methodName of dataCatalogStubMethods) { - const callPromise = this.dataCatalogStub.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.dataCatalogStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - return 'datacatalog.googleapis.com'; - } - - /** - * 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 -- - // ------------------- - /** - * A maximum of 10,000 entry groups may be created per organization across all - * locations. - * - * Users should enable the Data Catalog API in the project identified by - * the `parent` parameter (see [Data Catalog Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project this entry group is in. Example: - * - * * projects/{project_id}/locations/{location} - * - * Note that this EntryGroup and its child resources may not actually be - * stored in the location in this name. - * @param {string} request.entryGroupId - * Required. The id of the entry group to create. - * The id must begin with a letter or underscore, contain only English - * letters, numbers and underscores, and be at most 64 characters. - * @param {google.cloud.datacatalog.v1beta1.EntryGroup} request.entryGroup - * The entry group to create. Defaults to an empty entry group. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.create_entry_group.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_CreateEntryGroup_async - */ - createEntryGroup( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest - | undefined - ), - {} | undefined - ] - >; - createEntryGroup( - request: protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createEntryGroup( - request: protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createEntryGroup( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryGroupRequest - | 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.createEntryGroup(request, options, callback); - } - /** - * Updates an EntryGroup. The user should enable the Data Catalog API in the - * project identified by the `entry_group.name` parameter (see [Data Catalog - * Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1beta1.EntryGroup} request.entryGroup - * Required. The updated entry group. "name" field must be set. - * @param {google.protobuf.FieldMask} request.updateMask - * The fields to update on the entry group. If absent or empty, all modifiable - * fields are updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.update_entry_group.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_UpdateEntryGroup_async - */ - updateEntryGroup( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest - | undefined - ), - {} | undefined - ] - >; - updateEntryGroup( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateEntryGroup( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateEntryGroup( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryGroupRequest - | 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({ - 'entry_group.name': request.entryGroup!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateEntryGroup(request, options, callback); - } - /** - * Gets an EntryGroup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry group. For example, - * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - * @param {google.protobuf.FieldMask} request.readMask - * The fields to return. If not set or empty, all fields 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 an object representing [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.get_entry_group.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_GetEntryGroup_async - */ - getEntryGroup( - request?: protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest | undefined, - {} | undefined - ] - >; - getEntryGroup( - request: protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getEntryGroup( - request: protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getEntryGroup( - request?: protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - | protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntryGroup, - protos.google.cloud.datacatalog.v1beta1.IGetEntryGroupRequest | 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.getEntryGroup(request, options, callback); - } - /** - * Deletes an EntryGroup. Only entry groups that do not contain entries can be - * deleted. Users should enable the Data Catalog API in the project - * identified by the `name` parameter (see [Data Catalog Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry group. For example, - * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - * @param {boolean} [request.force] - * Optional. If true, deletes all entries in the entry group. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.delete_entry_group.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_DeleteEntryGroup_async - */ - deleteEntryGroup( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest - | undefined - ), - {} | undefined - ] - >; - deleteEntryGroup( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteEntryGroup( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteEntryGroup( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryGroupRequest - | 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.deleteEntryGroup(request, options, callback); - } - /** - * Creates an entry. Only entries of 'FILESET' type or user-specified type can - * be created. - * - * Users should enable the Data Catalog API in the project identified by - * the `parent` parameter (see [Data Catalog Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * A maximum of 100,000 entries may be created per entry group. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the entry group this entry is in. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * - * Note that this Entry and its child resources may not actually be stored in - * the location in this name. - * @param {string} request.entryId - * Required. The id of the entry to create. - * @param {google.cloud.datacatalog.v1beta1.Entry} request.entry - * Required. The entry 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 [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.create_entry.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_CreateEntry_async - */ - createEntry( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry, - protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest | undefined, - {} | undefined - ] - >; - createEntry( - request: protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createEntry( - request: protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createEntry( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry, - protos.google.cloud.datacatalog.v1beta1.ICreateEntryRequest | 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.createEntry(request, options, callback); - } - /** - * Updates an existing entry. - * Users should enable the Data Catalog API in the project identified by - * the `entry.name` parameter (see [Data Catalog Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1beta1.Entry} request.entry - * Required. The updated entry. The "name" field must be set. - * @param {google.protobuf.FieldMask} request.updateMask - * The fields to update on the entry. If absent or empty, all modifiable - * fields are updated. - * - * The following fields are modifiable: - * * For entries with type `DATA_STREAM`: - * * `schema` - * * For entries with type `FILESET` - * * `schema` - * * `display_name` - * * `description` - * * `gcs_fileset_spec` - * * `gcs_fileset_spec.file_patterns` - * * For entries with `user_specified_type` - * * `schema` - * * `display_name` - * * `description` - * * user_specified_type - * * user_specified_system - * * linked_resource - * * source_system_timestamps - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.update_entry.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_UpdateEntry_async - */ - updateEntry( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry, - protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest | undefined, - {} | undefined - ] - >; - updateEntry( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateEntry( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateEntry( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry, - protos.google.cloud.datacatalog.v1beta1.IUpdateEntryRequest | 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({ - 'entry.name': request.entry!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateEntry(request, options, callback); - } - /** - * Deletes an existing entry. Only entries created through - * {@link google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry|CreateEntry} - * method can be deleted. - * Users should enable the Data Catalog API in the project identified by - * the `name` parameter (see [Data Catalog Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.delete_entry.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_DeleteEntry_async - */ - deleteEntry( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest | undefined, - {} | undefined - ] - >; - deleteEntry( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteEntry( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteEntry( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1beta1.IDeleteEntryRequest | 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.deleteEntry(request, options, callback); - } - /** - * Gets an entry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the entry. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.get_entry.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_GetEntry_async - */ - getEntry( - request?: protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry, - protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest | undefined, - {} | undefined - ] - >; - getEntry( - request: protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getEntry( - request: protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getEntry( - request?: protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry, - protos.google.cloud.datacatalog.v1beta1.IGetEntryRequest | 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.getEntry(request, options, callback); - } - /** - * Get an entry by target resource name. This method allows clients to use - * the resource name from the source Google Cloud Platform service to get the - * Data Catalog Entry. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.linkedResource - * The full name of the Google Cloud Platform resource the Data Catalog - * entry represents. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name. - * Full names are case-sensitive. - * - * Examples: - * - * * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - * * //pubsub.googleapis.com/projects/projectId/topics/topicId - * @param {string} request.sqlResource - * The SQL name of the entry. SQL names are case-sensitive. - * - * Examples: - * - * * `pubsub.project_id.topic_id` - * * ``pubsub.project_id.`topic.id.with.dots` `` - * * `bigquery.table.project_id.dataset_id.table_id` - * * `bigquery.dataset.project_id.dataset_id` - * * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - * - * `*_id`s shoud satisfy the standard SQL rules for identifiers. - * https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.lookup_entry.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_LookupEntry_async - */ - lookupEntry( - request?: protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry, - protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest | undefined, - {} | undefined - ] - >; - lookupEntry( - request: protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - lookupEntry( - request: protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest - | null - | undefined, - {} | null | undefined - > - ): void; - lookupEntry( - request?: protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IEntry, - | protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry, - protos.google.cloud.datacatalog.v1beta1.ILookupEntryRequest | 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 || {}; - this.initialize(); - return this.innerApiCalls.lookupEntry(request, options, callback); - } - /** - * Creates a tag template. The user should enable the Data Catalog API in - * the project identified by the `parent` parameter (see [Data Catalog - * Resource - * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - * for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions. - * - * Example: - * - * * projects/{project_id}/locations/us-central1 - * @param {string} request.tagTemplateId - * Required. The id of the tag template to create. - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} request.tagTemplate - * Required. The tag template 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 [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.create_tag_template.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplate_async - */ - createTagTemplate( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest - | undefined - ), - {} | undefined - ] - >; - createTagTemplate( - request: protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTagTemplate( - request: protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTagTemplate( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateRequest - | 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.createTagTemplate(request, options, callback); - } - /** - * Gets a tag template. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.get_tag_template.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_GetTagTemplate_async - */ - getTagTemplate( - request?: protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - ( - | protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest - | undefined - ), - {} | undefined - ] - >; - getTagTemplate( - request: protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getTagTemplate( - request: protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getTagTemplate( - request?: protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - ( - | protos.google.cloud.datacatalog.v1beta1.IGetTagTemplateRequest - | 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.getTagTemplate(request, options, callback); - } - /** - * Updates a tag template. This method cannot be used to update the fields of - * a template. The tag template fields are represented as separate resources - * and should be updated using their own create/update/delete methods. - * Users should enable the Data Catalog API in the project identified by - * the `tag_template.name` parameter (see [Data Catalog Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1beta1.TagTemplate} request.tagTemplate - * Required. The template to update. The "name" field must be set. - * @param {google.protobuf.FieldMask} request.updateMask - * The field mask specifies the parts of the template to overwrite. - * - * Allowed fields: - * - * * `display_name` - * - * If absent or empty, all of the allowed fields above will be updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [TagTemplate]{@link google.cloud.datacatalog.v1beta1.TagTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.update_tag_template.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplate_async - */ - updateTagTemplate( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest - | undefined - ), - {} | undefined - ] - >; - updateTagTemplate( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTagTemplate( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTagTemplate( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplate, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateRequest - | 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({ - 'tag_template.name': request.tagTemplate!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateTagTemplate(request, options, callback); - } - /** - * Deletes a tag template and all tags using the template. - * Users should enable the Data Catalog API in the project identified by - * the `name` parameter (see [Data Catalog Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template to delete. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - * @param {boolean} request.force - * Required. Currently, this field must always be set to `true`. - * This confirms the deletion of any possible tags using this template. - * `force = false` will be supported in the future. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.delete_tag_template.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplate_async - */ - deleteTagTemplate( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest - | undefined - ), - {} | undefined - ] - >; - deleteTagTemplate( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTagTemplate( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTagTemplate( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateRequest - | 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.deleteTagTemplate(request, options, callback); - } - /** - * Creates a field in a tag template. The user should enable the Data Catalog - * API in the project identified by the `parent` parameter (see - * [Data Catalog Resource - * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - * for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project and the template location - * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - * - * Example: - * - * * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} - * @param {string} request.tagTemplateFieldId - * Required. The ID of the tag template field to create. - * Field ids can contain letters (both uppercase and lowercase), numbers - * (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - * character long and at most 128 characters long. Field IDs must also be - * unique within their template. - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} request.tagTemplateField - * Required. The tag template field 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 [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.create_tag_template_field.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplateField_async - */ - createTagTemplateField( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest - | undefined - ), - {} | undefined - ] - >; - createTagTemplateField( - request: protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTagTemplateField( - request: protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTagTemplateField( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreateTagTemplateFieldRequest - | 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.createTagTemplateField( - request, - options, - callback - ); - } - /** - * Updates a field in a tag template. This method cannot be used to update the - * field type. Users should enable the Data Catalog API in the project - * identified by the `name` parameter (see [Data Catalog Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template field. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - * @param {google.cloud.datacatalog.v1beta1.TagTemplateField} request.tagTemplateField - * Required. The template to update. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. The field mask specifies the parts of the template to be updated. - * Allowed fields: - * - * * `display_name` - * * `type.enum_type` - * * `is_required` - * - * If `update_mask` is not set or empty, all of the allowed fields above will - * be updated. - * - * When updating an enum type, the provided values will be merged with the - * existing values. Therefore, enum values can only be added, existing enum - * values cannot be deleted nor renamed. Updating a template field from - * optional to required is NOT allowed. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.update_tag_template_field.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplateField_async - */ - updateTagTemplateField( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest - | undefined - ), - {} | undefined - ] - >; - updateTagTemplateField( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTagTemplateField( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTagTemplateField( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagTemplateFieldRequest - | 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.updateTagTemplateField( - request, - options, - callback - ); - } - /** - * Renames a field in a tag template. The user should enable the Data Catalog - * API in the project identified by the `name` parameter (see [Data Catalog - * Resource - * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - * for more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - * @param {string} request.newTagTemplateFieldId - * Required. The new ID of this tag template field. For example, `my_new_field`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TagTemplateField]{@link google.cloud.datacatalog.v1beta1.TagTemplateField}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.rename_tag_template_field.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_RenameTagTemplateField_async - */ - renameTagTemplateField( - request?: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest - | undefined - ), - {} | undefined - ] - >; - renameTagTemplateField( - request: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - renameTagTemplateField( - request: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - renameTagTemplateField( - request?: protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - | protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITagTemplateField, - ( - | protos.google.cloud.datacatalog.v1beta1.IRenameTagTemplateFieldRequest - | 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.renameTagTemplateField( - request, - options, - callback - ); - } - /** - * Deletes a field in a tag template and all uses of that field. - * Users should enable the Data Catalog API in the project identified by - * the `name` parameter (see [Data Catalog Resource Project] - * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - * more information). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag template field to delete. Example: - * - * * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - * @param {boolean} request.force - * Required. Currently, this field must always be set to `true`. - * This confirms the deletion of this field from any tags using this field. - * `force = false` will be supported in the future. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.delete_tag_template_field.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplateField_async - */ - deleteTagTemplateField( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest - | undefined - ), - {} | undefined - ] - >; - deleteTagTemplateField( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTagTemplateField( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTagTemplateField( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagTemplateFieldRequest - | 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.deleteTagTemplateField( - request, - options, - callback - ); - } - /** - * Creates a tag on an {@link google.cloud.datacatalog.v1beta1.Entry|Entry}. - * Note: The project identified by the `parent` parameter for the - * [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) - * and the - * [tag - * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) - * used to create the tag must be from the same organization. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the resource to attach this tag to. Tags can be attached to - * Entries. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * - * Note that this Tag and its child resources may not actually be stored in - * the location in this name. - * @param {google.cloud.datacatalog.v1beta1.Tag} request.tag - * Required. The tag 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 [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.create_tag.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_CreateTag_async - */ - createTag( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITag, - protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest | undefined, - {} | undefined - ] - >; - createTag( - request: protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITag, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTag( - request: protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITag, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTag( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITag, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITag, - | protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITag, - protos.google.cloud.datacatalog.v1beta1.ICreateTagRequest | 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.createTag(request, options, callback); - } - /** - * Updates an existing tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1beta1.Tag} request.tag - * Required. The updated tag. The "name" field must be set. - * @param {google.protobuf.FieldMask} request.updateMask - * The fields to update on the Tag. If absent or empty, all modifiable fields - * are updated. Currently the only modifiable field is the field `fields`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.update_tag.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_UpdateTag_async - */ - updateTag( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITag, - protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest | undefined, - {} | undefined - ] - >; - updateTag( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITag, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTag( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITag, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTag( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITag, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITag, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITag, - protos.google.cloud.datacatalog.v1beta1.IUpdateTagRequest | 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({ - 'tag.name': request.tag!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateTag(request, options, callback); - } - /** - * Deletes a tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the tag to delete. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.delete_tag.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_DeleteTag_async - */ - deleteTag( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest | undefined, - {} | undefined - ] - >; - deleteTag( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTag( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTag( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - protos.google.cloud.datacatalog.v1beta1.IDeleteTagRequest | 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.deleteTag(request, options, callback); - } - /** - * Sets the access control policy for a resource. Replaces any existing - * policy. - * Supported resources are: - * - Tag templates. - * - Entries. - * - Entry groups. - * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - * and any external Google Cloud Platform resources synced to Data Catalog. - * - * Callers must have following Google IAM permission - * - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag - * templates. - * - `datacatalog.entries.setIamPolicy` to set policies on entries. - * - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.Policy} request.policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param {google.protobuf.FieldMask} request.updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.set_iam_policy.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_SetIamPolicy_async - */ - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined - ] - >; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.setIamPolicy(request, options, callback); - } - /** - * Gets the access control policy for a resource. A `NOT_FOUND` error - * is returned if the resource does not exist. An empty policy is returned - * if the resource exists but does not have a policy set on it. - * - * Supported resources are: - * - Tag templates. - * - Entries. - * - Entry groups. - * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - * and any external Google Cloud Platform resources synced to Data Catalog. - * - * Callers must have following Google IAM permission - * - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag - * templates. - * - `datacatalog.entries.getIamPolicy` to get policies on entries. - * - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.GetPolicyOptions} request.options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.get_iam_policy.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_GetIamPolicy_async - */ - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined - ] - >; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.getIamPolicy(request, options, callback); - } - /** - * Returns the caller's permissions on a resource. - * If the resource does not exist, an empty set of permissions is returned - * (We don't return a `NOT_FOUND` error). - * - * Supported resources are: - * - Tag templates. - * - Entries. - * - Entry groups. - * Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - * and any external Google Cloud Platform resources synced to Data Catalog. - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.test_iam_permissions.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_TestIamPermissions_async - */ - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined - ] - >; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } - - /** - * Searches Data Catalog for multiple resources like entries, tags that - * match a query. - * - * This is a custom method - * (https://cloud.google.com/apis/design/custom_methods) and does not return - * the complete resource, only the resource identifier and high level - * fields. Clients can subsequentally call `Get` methods. - * - * Note that Data Catalog search queries do not guarantee full recall. Query - * results that match your query may not be returned, even in subsequent - * result pages. Also note that results returned (and not returned) can vary - * across repeated search queries. - * - * See [Data Catalog Search - * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - * for more information. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} request.scope - * Required. The scope of this search request. A `scope` that has empty - * `include_org_ids`, `include_project_ids` AND false - * `include_gcp_public_datasets` is considered invalid. Data Catalog will - * return an error in such a case. - * @param {string} request.query - * Required. The query string in search query syntax. The query must be non-empty. - * - * Query strings can be simple as "x" or more qualified as: - * - * * name:x - * * column:x - * * description:y - * - * Note: Query tokens need to have a minimum of 3 characters for substring - * matching to work correctly. See [Data Catalog Search - * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - * for more information. - * @param {number} request.pageSize - * Number of results in the search page. If <=0 then defaults to 10. Max limit - * for page_size is 1000. Throws an invalid argument for page_size > 1000. - * @param {string} [request.pageToken] - * Optional. Pagination token returned in an earlier - * {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token}, which - * indicates that this is a continuation of a prior - * {@link google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog|SearchCatalogRequest} - * call, and that the system should return the next page of data. If empty, - * the first page is returned. - * @param {string} request.orderBy - * Specifies the ordering of results, currently supported case-sensitive - * choices are: - * - * * `relevance`, only supports descending - * * `last_modified_timestamp [asc|desc]`, defaults to descending if not - * specified - * - * If not specified, defaults to `relevance` descending. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [SearchCatalogResult]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResult}. - * 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 `searchCatalogAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - searchCatalog( - request?: protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[], - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest | null, - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse - ] - >; - searchCatalog( - request: protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - | protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResult - > - ): void; - searchCatalog( - request: protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - | protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResult - > - ): void; - searchCatalog( - request?: protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - | protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResult - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - | protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResult - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[], - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest | null, - protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); - return this.innerApiCalls.searchCatalog(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 {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} request.scope - * Required. The scope of this search request. A `scope` that has empty - * `include_org_ids`, `include_project_ids` AND false - * `include_gcp_public_datasets` is considered invalid. Data Catalog will - * return an error in such a case. - * @param {string} request.query - * Required. The query string in search query syntax. The query must be non-empty. - * - * Query strings can be simple as "x" or more qualified as: - * - * * name:x - * * column:x - * * description:y - * - * Note: Query tokens need to have a minimum of 3 characters for substring - * matching to work correctly. See [Data Catalog Search - * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - * for more information. - * @param {number} request.pageSize - * Number of results in the search page. If <=0 then defaults to 10. Max limit - * for page_size is 1000. Throws an invalid argument for page_size > 1000. - * @param {string} [request.pageToken] - * Optional. Pagination token returned in an earlier - * {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token}, which - * indicates that this is a continuation of a prior - * {@link google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog|SearchCatalogRequest} - * call, and that the system should return the next page of data. If empty, - * the first page is returned. - * @param {string} request.orderBy - * Specifies the ordering of results, currently supported case-sensitive - * choices are: - * - * * `relevance`, only supports descending - * * `last_modified_timestamp [asc|desc]`, defaults to descending if not - * specified - * - * If not specified, defaults to `relevance` descending. - * @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 [SearchCatalogResult]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResult} 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 `searchCatalogAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - searchCatalogStream( - request?: protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - options?: CallOptions - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['searchCatalog']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.searchCatalog.createStream( - this.innerApiCalls.searchCatalog as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `searchCatalog`, 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 {google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope} request.scope - * Required. The scope of this search request. A `scope` that has empty - * `include_org_ids`, `include_project_ids` AND false - * `include_gcp_public_datasets` is considered invalid. Data Catalog will - * return an error in such a case. - * @param {string} request.query - * Required. The query string in search query syntax. The query must be non-empty. - * - * Query strings can be simple as "x" or more qualified as: - * - * * name:x - * * column:x - * * description:y - * - * Note: Query tokens need to have a minimum of 3 characters for substring - * matching to work correctly. See [Data Catalog Search - * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - * for more information. - * @param {number} request.pageSize - * Number of results in the search page. If <=0 then defaults to 10. Max limit - * for page_size is 1000. Throws an invalid argument for page_size > 1000. - * @param {string} [request.pageToken] - * Optional. Pagination token returned in an earlier - * {@link google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token|SearchCatalogResponse.next_page_token}, which - * indicates that this is a continuation of a prior - * {@link google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog|SearchCatalogRequest} - * call, and that the system should return the next page of data. If empty, - * the first page is returned. - * @param {string} request.orderBy - * Specifies the ordering of results, currently supported case-sensitive - * choices are: - * - * * `relevance`, only supports descending - * * `last_modified_timestamp [asc|desc]`, defaults to descending if not - * specified - * - * If not specified, defaults to `relevance` descending. - * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [SearchCatalogResult]{@link google.cloud.datacatalog.v1beta1.SearchCatalogResult}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.search_catalog.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_SearchCatalog_async - */ - searchCatalogAsync( - request?: protos.google.cloud.datacatalog.v1beta1.ISearchCatalogRequest, - options?: CallOptions - ): AsyncIterable { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['searchCatalog']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.searchCatalog.asyncIterate( - this.innerApiCalls['searchCatalog'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists entry groups. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the location that contains the entry groups, which can be - * provided in URL format. Example: - * - * * projects/{project_id}/locations/{location} - * @param {number} [request.pageSize] - * Optional. The maximum number of items to return. Default is 10. Max limit is 1000. - * Throws an invalid argument for `page_size > 1000`. - * @param {string} [request.pageToken] - * Optional. Token that specifies which page is requested. If empty, the first page is - * 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 [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. - * 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 `listEntryGroupsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listEntryGroups( - request?: protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntryGroup[], - protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse - ] - >; - listEntryGroups( - request: protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IEntryGroup - > - ): void; - listEntryGroups( - request: protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IEntryGroup - > - ): void; - listEntryGroups( - request?: protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IEntryGroup - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IEntryGroup - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntryGroup[], - protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listEntryGroups(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 name of the location that contains the entry groups, which can be - * provided in URL format. Example: - * - * * projects/{project_id}/locations/{location} - * @param {number} [request.pageSize] - * Optional. The maximum number of items to return. Default is 10. Max limit is 1000. - * Throws an invalid argument for `page_size > 1000`. - * @param {string} [request.pageToken] - * Optional. Token that specifies which page is requested. If empty, the first page is - * 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 [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup} 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 `listEntryGroupsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listEntryGroupsStream( - request?: protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - 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['listEntryGroups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntryGroups.createStream( - this.innerApiCalls.listEntryGroups as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listEntryGroups`, 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 name of the location that contains the entry groups, which can be - * provided in URL format. Example: - * - * * projects/{project_id}/locations/{location} - * @param {number} [request.pageSize] - * Optional. The maximum number of items to return. Default is 10. Max limit is 1000. - * Throws an invalid argument for `page_size > 1000`. - * @param {string} [request.pageToken] - * Optional. Token that specifies which page is requested. If empty, the first page is - * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [EntryGroup]{@link google.cloud.datacatalog.v1beta1.EntryGroup}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.list_entry_groups.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_ListEntryGroups_async - */ - listEntryGroupsAsync( - request?: protos.google.cloud.datacatalog.v1beta1.IListEntryGroupsRequest, - 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['listEntryGroups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntryGroups.asyncIterate( - this.innerApiCalls['listEntryGroups'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists entries. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the entry group that contains the entries, which can - * be provided in URL format. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * @param {number} request.pageSize - * The maximum number of items to return. Default is 10. Max limit is 1000. - * Throws an invalid argument for `page_size > 1000`. - * @param {string} request.pageToken - * Token that specifies which page is requested. If empty, the first page is - * returned. - * @param {google.protobuf.FieldMask} request.readMask - * The fields to return for each Entry. If not set or empty, all - * fields are returned. - * For example, setting read_mask to contain only one path "name" will cause - * ListEntries to return a list of Entries with only "name" field. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. - * 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 `listEntriesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listEntries( - request?: protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry[], - protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListEntriesResponse - ] - >; - listEntries( - request: protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - | protos.google.cloud.datacatalog.v1beta1.IListEntriesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IEntry - > - ): void; - listEntries( - request: protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - | protos.google.cloud.datacatalog.v1beta1.IListEntriesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IEntry - > - ): void; - listEntries( - request?: protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - | protos.google.cloud.datacatalog.v1beta1.IListEntriesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IEntry - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - | protos.google.cloud.datacatalog.v1beta1.IListEntriesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IEntry - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IEntry[], - protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListEntriesResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listEntries(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 name of the entry group that contains the entries, which can - * be provided in URL format. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * @param {number} request.pageSize - * The maximum number of items to return. Default is 10. Max limit is 1000. - * Throws an invalid argument for `page_size > 1000`. - * @param {string} request.pageToken - * Token that specifies which page is requested. If empty, the first page is - * returned. - * @param {google.protobuf.FieldMask} request.readMask - * The fields to return for each Entry. If not set or empty, all - * fields are returned. - * For example, setting read_mask to contain only one path "name" will cause - * ListEntries to return a list of Entries with only "name" field. - * @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 [Entry]{@link google.cloud.datacatalog.v1beta1.Entry} 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 `listEntriesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listEntriesStream( - request?: protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - 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['listEntries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntries.createStream( - this.innerApiCalls.listEntries as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listEntries`, 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 name of the entry group that contains the entries, which can - * be provided in URL format. Example: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * @param {number} request.pageSize - * The maximum number of items to return. Default is 10. Max limit is 1000. - * Throws an invalid argument for `page_size > 1000`. - * @param {string} request.pageToken - * Token that specifies which page is requested. If empty, the first page is - * returned. - * @param {google.protobuf.FieldMask} request.readMask - * The fields to return for each Entry. If not set or empty, all - * fields are returned. - * For example, setting read_mask to contain only one path "name" will cause - * ListEntries to return a list of Entries with only "name" field. - * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [Entry]{@link google.cloud.datacatalog.v1beta1.Entry}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.list_entries.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_ListEntries_async - */ - listEntriesAsync( - request?: protos.google.cloud.datacatalog.v1beta1.IListEntriesRequest, - 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['listEntries']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEntries.asyncIterate( - this.innerApiCalls['listEntries'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists the tags on an {@link google.cloud.datacatalog.v1beta1.Entry|Entry}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the Data Catalog resource to list the tags of. The resource - * could be an {@link google.cloud.datacatalog.v1beta1.Entry|Entry} or an - * {@link google.cloud.datacatalog.v1beta1.EntryGroup|EntryGroup}. - * - * Examples: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * @param {number} request.pageSize - * The maximum number of tags to return. Default is 10. Max limit is 1000. - * @param {string} request.pageToken - * Token that specifies which page is requested. If empty, the first page is - * 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 [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. - * 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 `listTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listTags( - request?: protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITag[], - protos.google.cloud.datacatalog.v1beta1.IListTagsRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListTagsResponse - ] - >; - listTags( - request: protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ITag - > - ): void; - listTags( - request: protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ITag - > - ): void; - listTags( - request?: protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ITag - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ITag - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITag[], - protos.google.cloud.datacatalog.v1beta1.IListTagsRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListTagsResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listTags(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 name of the Data Catalog resource to list the tags of. The resource - * could be an {@link google.cloud.datacatalog.v1beta1.Entry|Entry} or an - * {@link google.cloud.datacatalog.v1beta1.EntryGroup|EntryGroup}. - * - * Examples: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * @param {number} request.pageSize - * The maximum number of tags to return. Default is 10. Max limit is 1000. - * @param {string} request.pageToken - * Token that specifies which page is requested. If empty, the first page is - * 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 [Tag]{@link google.cloud.datacatalog.v1beta1.Tag} 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 `listTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listTagsStream( - request?: protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - 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['listTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTags.createStream( - this.innerApiCalls.listTags as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listTags`, 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 name of the Data Catalog resource to list the tags of. The resource - * could be an {@link google.cloud.datacatalog.v1beta1.Entry|Entry} or an - * {@link google.cloud.datacatalog.v1beta1.EntryGroup|EntryGroup}. - * - * Examples: - * - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - * * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - * @param {number} request.pageSize - * The maximum number of tags to return. Default is 10. Max limit is 1000. - * @param {string} request.pageToken - * Token that specifies which page is requested. If empty, the first page is - * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [Tag]{@link google.cloud.datacatalog.v1beta1.Tag}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1beta1/data_catalog.list_tags.js - * region_tag:datacatalog_v1beta1_generated_DataCatalog_ListTags_async - */ - listTagsAsync( - request?: protos.google.cloud.datacatalog.v1beta1.IListTagsRequest, - 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['listTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTags.asyncIterate( - this.innerApiCalls['listTags'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified entry resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @returns {string} Resource name string. - */ - entryPath( - project: string, - location: string, - entryGroup: string, - entry: string - ) { - return this.pathTemplates.entryPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - }); - } - - /** - * Parse the project from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).project; - } - - /** - * Parse the location from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).location; - } - - /** - * Parse the entry_group from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry_group; - } - - /** - * Parse the entry from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry; - } - - /** - * Return a fully-qualified entryGroup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @returns {string} Resource name string. - */ - entryGroupPath(project: string, location: string, entryGroup: string) { - return this.pathTemplates.entryGroupPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - }); - } - - /** - * Parse the project from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .project; - } - - /** - * Parse the location from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .location; - } - - /** - * Parse the entry_group from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .entry_group; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project: string, location: string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified policyTag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @param {string} policy_tag - * @returns {string} Resource name string. - */ - policyTagPath( - project: string, - location: string, - taxonomy: string, - policyTag: string - ) { - return this.pathTemplates.policyTagPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - policy_tag: policyTag, - }); - } - - /** - * Parse the project from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .project; - } - - /** - * Parse the location from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .location; - } - - /** - * Parse the taxonomy from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .taxonomy; - } - - /** - * Parse the policy_tag from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the policy_tag. - */ - matchPolicyTagFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .policy_tag; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project: string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified tag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @param {string} tag - * @returns {string} Resource name string. - */ - tagPath( - project: string, - location: string, - entryGroup: string, - entry: string, - tag: string - ) { - return this.pathTemplates.tagPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - tag: tag, - }); - } - - /** - * Parse the project from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).project; - } - - /** - * Parse the location from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).location; - } - - /** - * Parse the entry_group from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry_group; - } - - /** - * Parse the entry from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry; - } - - /** - * Parse the tag from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the tag. - */ - matchTagFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).tag; - } - - /** - * Return a fully-qualified tagTemplate resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @returns {string} Resource name string. - */ - tagTemplatePath(project: string, location: string, tagTemplate: string) { - return this.pathTemplates.tagTemplatePathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - }); - } - - /** - * Parse the project from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .project; - } - - /** - * Parse the location from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .location; - } - - /** - * Parse the tag_template from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .tag_template; - } - - /** - * Return a fully-qualified tagTemplateField resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @param {string} field - * @returns {string} Resource name string. - */ - tagTemplateFieldPath( - project: string, - location: string, - tagTemplate: string, - field: string - ) { - return this.pathTemplates.tagTemplateFieldPathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - field: field, - }); - } - - /** - * Parse the project from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).project; - } - - /** - * Parse the location from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).location; - } - - /** - * Parse the tag_template from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).tag_template; - } - - /** - * Parse the field from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the field. - */ - matchFieldFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).field; - } - - /** - * Return a fully-qualified taxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @returns {string} Resource name string. - */ - taxonomyPath(project: string, location: string, taxonomy: string) { - return this.pathTemplates.taxonomyPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - }); - } - - /** - * Parse the project from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).project; - } - - /** - * Parse the location from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).location; - } - - /** - * Parse the taxonomy from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).taxonomy; - } - - /** - * 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.dataCatalogStub && !this._terminated) { - return this.dataCatalogStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/src/v1beta1/data_catalog_client_config.json b/src/v1beta1/data_catalog_client_config.json deleted file mode 100644 index d0caa89a..00000000 --- a/src/v1beta1/data_catalog_client_config.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1beta1.DataCatalog": { - "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": { - "SearchCatalog": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "DeleteEntryGroup": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListEntryGroups": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEntry": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEntry": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetEntry": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "LookupEntry": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListEntries": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "UpdateTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTagTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RenameTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTagTemplateField": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTag": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTag": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListTags": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/src/v1beta1/data_catalog_proto_list.json b/src/v1beta1/data_catalog_proto_list.json deleted file mode 100644 index e36f6d25..00000000 --- a/src/v1beta1/data_catalog_proto_list.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - "../../protos/google/cloud/datacatalog/v1beta1/common.proto", - "../../protos/google/cloud/datacatalog/v1beta1/datacatalog.proto", - "../../protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto", - "../../protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto", - "../../protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto", - "../../protos/google/cloud/datacatalog/v1beta1/schema.proto", - "../../protos/google/cloud/datacatalog/v1beta1/search.proto", - "../../protos/google/cloud/datacatalog/v1beta1/table_spec.proto", - "../../protos/google/cloud/datacatalog/v1beta1/tags.proto", - "../../protos/google/cloud/datacatalog/v1beta1/timestamps.proto" -] diff --git a/src/v1beta1/gapic_metadata.json b/src/v1beta1/gapic_metadata.json deleted file mode 100644 index 45ce001c..00000000 --- a/src/v1beta1/gapic_metadata.json +++ /dev/null @@ -1,495 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.datacatalog.v1beta1", - "libraryPackage": "@google-cloud/datacatalog", - "services": { - "DataCatalog": { - "clients": { - "grpc": { - "libraryClient": "DataCatalogClient", - "rpcs": { - "CreateEntryGroup": { - "methods": [ - "createEntryGroup" - ] - }, - "UpdateEntryGroup": { - "methods": [ - "updateEntryGroup" - ] - }, - "GetEntryGroup": { - "methods": [ - "getEntryGroup" - ] - }, - "DeleteEntryGroup": { - "methods": [ - "deleteEntryGroup" - ] - }, - "CreateEntry": { - "methods": [ - "createEntry" - ] - }, - "UpdateEntry": { - "methods": [ - "updateEntry" - ] - }, - "DeleteEntry": { - "methods": [ - "deleteEntry" - ] - }, - "GetEntry": { - "methods": [ - "getEntry" - ] - }, - "LookupEntry": { - "methods": [ - "lookupEntry" - ] - }, - "CreateTagTemplate": { - "methods": [ - "createTagTemplate" - ] - }, - "GetTagTemplate": { - "methods": [ - "getTagTemplate" - ] - }, - "UpdateTagTemplate": { - "methods": [ - "updateTagTemplate" - ] - }, - "DeleteTagTemplate": { - "methods": [ - "deleteTagTemplate" - ] - }, - "CreateTagTemplateField": { - "methods": [ - "createTagTemplateField" - ] - }, - "UpdateTagTemplateField": { - "methods": [ - "updateTagTemplateField" - ] - }, - "RenameTagTemplateField": { - "methods": [ - "renameTagTemplateField" - ] - }, - "DeleteTagTemplateField": { - "methods": [ - "deleteTagTemplateField" - ] - }, - "CreateTag": { - "methods": [ - "createTag" - ] - }, - "UpdateTag": { - "methods": [ - "updateTag" - ] - }, - "DeleteTag": { - "methods": [ - "deleteTag" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "SearchCatalog": { - "methods": [ - "searchCatalog", - "searchCatalogStream", - "searchCatalogAsync" - ] - }, - "ListEntryGroups": { - "methods": [ - "listEntryGroups", - "listEntryGroupsStream", - "listEntryGroupsAsync" - ] - }, - "ListEntries": { - "methods": [ - "listEntries", - "listEntriesStream", - "listEntriesAsync" - ] - }, - "ListTags": { - "methods": [ - "listTags", - "listTagsStream", - "listTagsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "DataCatalogClient", - "rpcs": { - "CreateEntryGroup": { - "methods": [ - "createEntryGroup" - ] - }, - "UpdateEntryGroup": { - "methods": [ - "updateEntryGroup" - ] - }, - "GetEntryGroup": { - "methods": [ - "getEntryGroup" - ] - }, - "DeleteEntryGroup": { - "methods": [ - "deleteEntryGroup" - ] - }, - "CreateEntry": { - "methods": [ - "createEntry" - ] - }, - "UpdateEntry": { - "methods": [ - "updateEntry" - ] - }, - "DeleteEntry": { - "methods": [ - "deleteEntry" - ] - }, - "GetEntry": { - "methods": [ - "getEntry" - ] - }, - "LookupEntry": { - "methods": [ - "lookupEntry" - ] - }, - "CreateTagTemplate": { - "methods": [ - "createTagTemplate" - ] - }, - "GetTagTemplate": { - "methods": [ - "getTagTemplate" - ] - }, - "UpdateTagTemplate": { - "methods": [ - "updateTagTemplate" - ] - }, - "DeleteTagTemplate": { - "methods": [ - "deleteTagTemplate" - ] - }, - "CreateTagTemplateField": { - "methods": [ - "createTagTemplateField" - ] - }, - "UpdateTagTemplateField": { - "methods": [ - "updateTagTemplateField" - ] - }, - "RenameTagTemplateField": { - "methods": [ - "renameTagTemplateField" - ] - }, - "DeleteTagTemplateField": { - "methods": [ - "deleteTagTemplateField" - ] - }, - "CreateTag": { - "methods": [ - "createTag" - ] - }, - "UpdateTag": { - "methods": [ - "updateTag" - ] - }, - "DeleteTag": { - "methods": [ - "deleteTag" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "SearchCatalog": { - "methods": [ - "searchCatalog", - "searchCatalogStream", - "searchCatalogAsync" - ] - }, - "ListEntryGroups": { - "methods": [ - "listEntryGroups", - "listEntryGroupsStream", - "listEntryGroupsAsync" - ] - }, - "ListEntries": { - "methods": [ - "listEntries", - "listEntriesStream", - "listEntriesAsync" - ] - }, - "ListTags": { - "methods": [ - "listTags", - "listTagsStream", - "listTagsAsync" - ] - } - } - } - } - }, - "PolicyTagManager": { - "clients": { - "grpc": { - "libraryClient": "PolicyTagManagerClient", - "rpcs": { - "CreateTaxonomy": { - "methods": [ - "createTaxonomy" - ] - }, - "DeleteTaxonomy": { - "methods": [ - "deleteTaxonomy" - ] - }, - "UpdateTaxonomy": { - "methods": [ - "updateTaxonomy" - ] - }, - "GetTaxonomy": { - "methods": [ - "getTaxonomy" - ] - }, - "CreatePolicyTag": { - "methods": [ - "createPolicyTag" - ] - }, - "DeletePolicyTag": { - "methods": [ - "deletePolicyTag" - ] - }, - "UpdatePolicyTag": { - "methods": [ - "updatePolicyTag" - ] - }, - "GetPolicyTag": { - "methods": [ - "getPolicyTag" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "ListTaxonomies": { - "methods": [ - "listTaxonomies", - "listTaxonomiesStream", - "listTaxonomiesAsync" - ] - }, - "ListPolicyTags": { - "methods": [ - "listPolicyTags", - "listPolicyTagsStream", - "listPolicyTagsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "PolicyTagManagerClient", - "rpcs": { - "CreateTaxonomy": { - "methods": [ - "createTaxonomy" - ] - }, - "DeleteTaxonomy": { - "methods": [ - "deleteTaxonomy" - ] - }, - "UpdateTaxonomy": { - "methods": [ - "updateTaxonomy" - ] - }, - "GetTaxonomy": { - "methods": [ - "getTaxonomy" - ] - }, - "CreatePolicyTag": { - "methods": [ - "createPolicyTag" - ] - }, - "DeletePolicyTag": { - "methods": [ - "deletePolicyTag" - ] - }, - "UpdatePolicyTag": { - "methods": [ - "updatePolicyTag" - ] - }, - "GetPolicyTag": { - "methods": [ - "getPolicyTag" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "ListTaxonomies": { - "methods": [ - "listTaxonomies", - "listTaxonomiesStream", - "listTaxonomiesAsync" - ] - }, - "ListPolicyTags": { - "methods": [ - "listPolicyTags", - "listPolicyTagsStream", - "listPolicyTagsAsync" - ] - } - } - } - } - }, - "PolicyTagManagerSerialization": { - "clients": { - "grpc": { - "libraryClient": "PolicyTagManagerSerializationClient", - "rpcs": { - "ImportTaxonomies": { - "methods": [ - "importTaxonomies" - ] - }, - "ExportTaxonomies": { - "methods": [ - "exportTaxonomies" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "PolicyTagManagerSerializationClient", - "rpcs": { - "ImportTaxonomies": { - "methods": [ - "importTaxonomies" - ] - }, - "ExportTaxonomies": { - "methods": [ - "exportTaxonomies" - ] - } - } - } - } - } - } -} diff --git a/src/v1beta1/index.ts b/src/v1beta1/index.ts deleted file mode 100644 index 29079e30..00000000 --- a/src/v1beta1/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 {DataCatalogClient} from './data_catalog_client'; -export {PolicyTagManagerClient} from './policy_tag_manager_client'; -export {PolicyTagManagerSerializationClient} from './policy_tag_manager_serialization_client'; diff --git a/src/v1beta1/policy_tag_manager_client.ts b/src/v1beta1/policy_tag_manager_client.ts deleted file mode 100644 index f8996bc9..00000000 --- a/src/v1beta1/policy_tag_manager_client.ts +++ /dev/null @@ -1,2346 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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/policy_tag_manager_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './policy_tag_manager_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The policy tag manager API service allows clients to manage their taxonomies - * and policy tags. - * @class - * @memberof v1beta1 - */ -export class PolicyTagManagerClient { - 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}; - 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}; - policyTagManagerStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of PolicyTagManagerClient. - * - * @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 | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. - * 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 PolicyTagManagerClient({fallback: 'rest'}, gax); - * ``` - */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback - ) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof PolicyTagManagerClient; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.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); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.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 = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { - 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 = { - entryPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}' - ), - entryGroupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - policyTagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - tagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}' - ), - tagTemplatePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}' - ), - tagTemplateFieldPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}' - ), - taxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}' - ), - }; - - // 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 = { - listTaxonomies: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'taxonomies' - ), - listPolicyTags: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'policyTags' - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.datacatalog.v1beta1.PolicyTagManager', - 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.policyTagManagerStub) { - return this.policyTagManagerStub; - } - - // Put together the "service stub" for - // google.cloud.datacatalog.v1beta1.PolicyTagManager. - this.policyTagManagerStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.datacatalog.v1beta1.PolicyTagManager' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.datacatalog.v1beta1 - .PolicyTagManager, - 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 policyTagManagerStubMethods = [ - 'createTaxonomy', - 'deleteTaxonomy', - 'updateTaxonomy', - 'listTaxonomies', - 'getTaxonomy', - 'createPolicyTag', - 'deletePolicyTag', - 'updatePolicyTag', - 'listPolicyTags', - 'getPolicyTag', - 'getIamPolicy', - 'setIamPolicy', - 'testIamPermissions', - ]; - for (const methodName of policyTagManagerStubMethods) { - const callPromise = this.policyTagManagerStub.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.policyTagManagerStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - return 'datacatalog.googleapis.com'; - } - - /** - * 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 -- - // ------------------- - /** - * Creates a taxonomy in the specified project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the project that the taxonomy will belong to. - * @param {google.cloud.datacatalog.v1beta1.Taxonomy} request.taxonomy - * The taxonomy to be created. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.create_taxonomy.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_CreateTaxonomy_async - */ - createTaxonomy( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest - | undefined - ), - {} | undefined - ] - >; - createTaxonomy( - request: protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTaxonomy( - request: protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createTaxonomy( - request?: protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreateTaxonomyRequest - | 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.createTaxonomy(request, options, callback); - } - /** - * Deletes a taxonomy. This operation will also delete all - * policy tags in this taxonomy along with their associated policies. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the taxonomy to be deleted. All policy tags in - * this taxonomy will also be deleted. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.delete_taxonomy.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_DeleteTaxonomy_async - */ - deleteTaxonomy( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest - | undefined - ), - {} | undefined - ] - >; - deleteTaxonomy( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTaxonomy( - request: protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deleteTaxonomy( - request?: protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeleteTaxonomyRequest - | 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.deleteTaxonomy(request, options, callback); - } - /** - * Updates a taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1beta1.Taxonomy} request.taxonomy - * The taxonomy to update. Only description, display_name, and activated - * policy types can be updated. - * @param {google.protobuf.FieldMask} request.updateMask - * The update mask applies to the resource. For the `FieldMask` definition, - * see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * If not set, defaults to all of the fields that are allowed to update. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.update_taxonomy.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_UpdateTaxonomy_async - */ - updateTaxonomy( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest - | undefined - ), - {} | undefined - ] - >; - updateTaxonomy( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTaxonomy( - request: protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updateTaxonomy( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdateTaxonomyRequest - | 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({ - 'taxonomy.name': request.taxonomy!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateTaxonomy(request, options, callback); - } - /** - * Gets a taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the requested taxonomy. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.get_taxonomy.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_GetTaxonomy_async - */ - getTaxonomy( - request?: protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest | undefined, - {} | undefined - ] - >; - getTaxonomy( - request: protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getTaxonomy( - request: protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getTaxonomy( - request?: protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - | protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITaxonomy, - protos.google.cloud.datacatalog.v1beta1.IGetTaxonomyRequest | 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.getTaxonomy(request, options, callback); - } - /** - * Creates a policy tag in the specified taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the taxonomy that the policy tag will belong to. - * @param {google.cloud.datacatalog.v1beta1.PolicyTag} request.policyTag - * The policy tag to be created. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.create_policy_tag.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_CreatePolicyTag_async - */ - createPolicyTag( - request?: protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest - | undefined - ), - {} | undefined - ] - >; - createPolicyTag( - request: protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createPolicyTag( - request: protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createPolicyTag( - request?: protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - ( - | protos.google.cloud.datacatalog.v1beta1.ICreatePolicyTagRequest - | 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.createPolicyTag(request, options, callback); - } - /** - * Deletes a policy tag. Also deletes all of its descendant policy tags. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the policy tag to be deleted. All of its descendant - * policy tags will also be deleted. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.delete_policy_tag.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_DeletePolicyTag_async - */ - deletePolicyTag( - request?: protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest - | undefined - ), - {} | undefined - ] - >; - deletePolicyTag( - request: protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deletePolicyTag( - request: protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - deletePolicyTag( - request?: protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.datacatalog.v1beta1.IDeletePolicyTagRequest - | 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.deletePolicyTag(request, options, callback); - } - /** - * Updates a policy tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.datacatalog.v1beta1.PolicyTag} request.policyTag - * The policy tag to update. Only the description, display_name, and - * parent_policy_tag fields can be updated. - * @param {google.protobuf.FieldMask} request.updateMask - * The update mask applies to the resource. Only display_name, description and - * parent_policy_tag can be updated and thus can be listed in the mask. If - * update_mask is not provided, all allowed fields (i.e. display_name, - * description and parent) will be updated. For more information including the - * `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * If not set, defaults to all of the fields that are allowed to update. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.update_policy_tag.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_UpdatePolicyTag_async - */ - updatePolicyTag( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest - | undefined - ), - {} | undefined - ] - >; - updatePolicyTag( - request: protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updatePolicyTag( - request: protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - updatePolicyTag( - request?: protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - ( - | protos.google.cloud.datacatalog.v1beta1.IUpdatePolicyTagRequest - | 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({ - 'policy_tag.name': request.policyTag!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updatePolicyTag(request, options, callback); - } - /** - * Gets a policy tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Resource name of the requested policy tag. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.get_policy_tag.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_GetPolicyTag_async - */ - getPolicyTag( - request?: protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest | undefined, - {} | undefined - ] - >; - getPolicyTag( - request: protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getPolicyTag( - request: protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): void; - getPolicyTag( - request?: protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - | protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IPolicyTag, - protos.google.cloud.datacatalog.v1beta1.IGetPolicyTagRequest | 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.getPolicyTag(request, options, callback); - } - /** - * Gets the IAM policy for a taxonomy or a policy tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.GetPolicyOptions} request.options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.get_iam_policy.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_GetIamPolicy_async - */ - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | undefined, - {} | undefined - ] - >; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - getIamPolicy( - request: protos.google.iam.v1.IGetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - getIamPolicy( - request?: protos.google.iam.v1.IGetIamPolicyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.IGetIamPolicyRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.getIamPolicy(request, options, callback); - } - /** - * Sets the IAM policy for a taxonomy or a policy tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.Policy} request.policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param {google.protobuf.FieldMask} request.updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.set_iam_policy.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_SetIamPolicy_async - */ - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined - ] - >; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.setIamPolicy(request, options, callback); - } - /** - * Returns the permissions that a caller has on the specified taxonomy or - * policy tag. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.test_iam_permissions.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_TestIamPermissions_async - */ - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined - ] - >; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } - - /** - * Lists all taxonomies in a project in a particular location that the caller - * has permission to view. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the project to list the taxonomies of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000. - * If not set, defaults to 50. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. If - * not set, defaults to an empty string. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy}. - * 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 `listTaxonomiesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listTaxonomies( - request?: protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITaxonomy[], - protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse - ] - >; - listTaxonomies( - request: protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - | protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ITaxonomy - > - ): void; - listTaxonomies( - request: protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - | protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ITaxonomy - > - ): void; - listTaxonomies( - request?: protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - | protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ITaxonomy - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - | protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.ITaxonomy - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.ITaxonomy[], - protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listTaxonomies(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. Resource name of the project to list the taxonomies of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000. - * If not set, defaults to 50. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. If - * not set, defaults to an empty string. - * @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 [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy} 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 `listTaxonomiesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listTaxonomiesStream( - request?: protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - 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['listTaxonomies']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTaxonomies.createStream( - this.innerApiCalls.listTaxonomies as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listTaxonomies`, 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. Resource name of the project to list the taxonomies of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000. - * If not set, defaults to 50. - * @param {string} request.pageToken - * The next_page_token value returned from a previous list request, if any. If - * not set, defaults to an empty string. - * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [Taxonomy]{@link google.cloud.datacatalog.v1beta1.Taxonomy}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.list_taxonomies.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_ListTaxonomies_async - */ - listTaxonomiesAsync( - request?: protos.google.cloud.datacatalog.v1beta1.IListTaxonomiesRequest, - 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['listTaxonomies']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listTaxonomies.asyncIterate( - this.innerApiCalls['listTaxonomies'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all policy tags in a taxonomy. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the taxonomy to list the policy tags of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000. - * If not set, defaults to 50. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. If - * not set, defaults to an empty string. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag}. - * 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 `listPolicyTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listPolicyTags( - request?: protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IPolicyTag[], - protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse - ] - >; - listPolicyTags( - request: protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IPolicyTag - > - ): void; - listPolicyTags( - request: protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - callback: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IPolicyTag - > - ): void; - listPolicyTags( - request?: protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IPolicyTag - >, - callback?: PaginationCallback< - protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - | protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse - | null - | undefined, - protos.google.cloud.datacatalog.v1beta1.IPolicyTag - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IPolicyTag[], - protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest | null, - protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsResponse - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as 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.listPolicyTags(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. Resource name of the taxonomy to list the policy tags of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000. - * If not set, defaults to 50. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. If - * not set, defaults to an empty string. - * @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 [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag} 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 `listPolicyTagsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ - listPolicyTagsStream( - request?: protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - 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['listPolicyTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPolicyTags.createStream( - this.innerApiCalls.listPolicyTags as GaxCall, - request, - callSettings - ); - } - - /** - * Equivalent to `listPolicyTags`, 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. Resource name of the taxonomy to list the policy tags of. - * @param {number} request.pageSize - * The maximum number of items to return. Must be a value between 1 and 1000. - * If not set, defaults to 50. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. If - * not set, defaults to an empty string. - * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). - * When you iterate the returned iterable, each element will be an object representing - * [PolicyTag]{@link google.cloud.datacatalog.v1beta1.PolicyTag}. 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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager.list_policy_tags.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManager_ListPolicyTags_async - */ - listPolicyTagsAsync( - request?: protos.google.cloud.datacatalog.v1beta1.IListPolicyTagsRequest, - 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['listPolicyTags']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listPolicyTags.asyncIterate( - this.innerApiCalls['listPolicyTags'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified entry resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @returns {string} Resource name string. - */ - entryPath( - project: string, - location: string, - entryGroup: string, - entry: string - ) { - return this.pathTemplates.entryPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - }); - } - - /** - * Parse the project from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).project; - } - - /** - * Parse the location from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).location; - } - - /** - * Parse the entry_group from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry_group; - } - - /** - * Parse the entry from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry; - } - - /** - * Return a fully-qualified entryGroup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @returns {string} Resource name string. - */ - entryGroupPath(project: string, location: string, entryGroup: string) { - return this.pathTemplates.entryGroupPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - }); - } - - /** - * Parse the project from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .project; - } - - /** - * Parse the location from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .location; - } - - /** - * Parse the entry_group from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .entry_group; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project: string, location: string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified policyTag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @param {string} policy_tag - * @returns {string} Resource name string. - */ - policyTagPath( - project: string, - location: string, - taxonomy: string, - policyTag: string - ) { - return this.pathTemplates.policyTagPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - policy_tag: policyTag, - }); - } - - /** - * Parse the project from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .project; - } - - /** - * Parse the location from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .location; - } - - /** - * Parse the taxonomy from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .taxonomy; - } - - /** - * Parse the policy_tag from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the policy_tag. - */ - matchPolicyTagFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .policy_tag; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project: string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified tag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @param {string} tag - * @returns {string} Resource name string. - */ - tagPath( - project: string, - location: string, - entryGroup: string, - entry: string, - tag: string - ) { - return this.pathTemplates.tagPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - tag: tag, - }); - } - - /** - * Parse the project from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).project; - } - - /** - * Parse the location from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).location; - } - - /** - * Parse the entry_group from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry_group; - } - - /** - * Parse the entry from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry; - } - - /** - * Parse the tag from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the tag. - */ - matchTagFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).tag; - } - - /** - * Return a fully-qualified tagTemplate resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @returns {string} Resource name string. - */ - tagTemplatePath(project: string, location: string, tagTemplate: string) { - return this.pathTemplates.tagTemplatePathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - }); - } - - /** - * Parse the project from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .project; - } - - /** - * Parse the location from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .location; - } - - /** - * Parse the tag_template from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .tag_template; - } - - /** - * Return a fully-qualified tagTemplateField resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @param {string} field - * @returns {string} Resource name string. - */ - tagTemplateFieldPath( - project: string, - location: string, - tagTemplate: string, - field: string - ) { - return this.pathTemplates.tagTemplateFieldPathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - field: field, - }); - } - - /** - * Parse the project from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).project; - } - - /** - * Parse the location from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).location; - } - - /** - * Parse the tag_template from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).tag_template; - } - - /** - * Parse the field from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the field. - */ - matchFieldFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).field; - } - - /** - * Return a fully-qualified taxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @returns {string} Resource name string. - */ - taxonomyPath(project: string, location: string, taxonomy: string) { - return this.pathTemplates.taxonomyPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - }); - } - - /** - * Parse the project from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).project; - } - - /** - * Parse the location from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).location; - } - - /** - * Parse the taxonomy from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).taxonomy; - } - - /** - * 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.policyTagManagerStub && !this._terminated) { - return this.policyTagManagerStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/src/v1beta1/policy_tag_manager_client_config.json b/src/v1beta1/policy_tag_manager_client_config.json deleted file mode 100644 index 13966495..00000000 --- a/src/v1beta1/policy_tag_manager_client_config.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1beta1.PolicyTagManager": { - "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": { - "CreateTaxonomy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTaxonomy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTaxonomy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListTaxonomies": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetTaxonomy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreatePolicyTag": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeletePolicyTag": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdatePolicyTag": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListPolicyTags": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetPolicyTag": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/src/v1beta1/policy_tag_manager_proto_list.json b/src/v1beta1/policy_tag_manager_proto_list.json deleted file mode 100644 index e36f6d25..00000000 --- a/src/v1beta1/policy_tag_manager_proto_list.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - "../../protos/google/cloud/datacatalog/v1beta1/common.proto", - "../../protos/google/cloud/datacatalog/v1beta1/datacatalog.proto", - "../../protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto", - "../../protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto", - "../../protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto", - "../../protos/google/cloud/datacatalog/v1beta1/schema.proto", - "../../protos/google/cloud/datacatalog/v1beta1/search.proto", - "../../protos/google/cloud/datacatalog/v1beta1/table_spec.proto", - "../../protos/google/cloud/datacatalog/v1beta1/tags.proto", - "../../protos/google/cloud/datacatalog/v1beta1/timestamps.proto" -] diff --git a/src/v1beta1/policy_tag_manager_serialization_client.ts b/src/v1beta1/policy_tag_manager_serialization_client.ts deleted file mode 100644 index 9cf013c9..00000000 --- a/src/v1beta1/policy_tag_manager_serialization_client.ts +++ /dev/null @@ -1,1078 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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, -} from 'google-gax'; - -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -/** - * Client JSON configuration object, loaded from - * `src/v1beta1/policy_tag_manager_serialization_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './policy_tag_manager_serialization_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Policy tag manager serialization API service allows clients to manipulate - * their taxonomies and policy tags data with serialized format. - * @class - * @memberof v1beta1 - */ -export class PolicyTagManagerSerializationClient { - 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}; - 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}; - policyTagManagerSerializationStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of PolicyTagManagerSerializationClient. - * - * @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 | "rest"} [options.fallback] - Use HTTP fallback mode. - * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. - * 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 PolicyTagManagerSerializationClient({fallback: 'rest'}, gax); - * ``` - */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback - ) { - // Ensure that options include all the required fields. - const staticMembers = this - .constructor as typeof PolicyTagManagerSerializationClient; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || staticMembers.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); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== staticMembers.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 = staticMembers.servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === staticMembers.servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { - 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 = { - entryPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}' - ), - entryGroupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - policyTagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - tagPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}' - ), - tagTemplatePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}' - ), - tagTemplateFieldPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}' - ), - taxonomyPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/taxonomies/{taxonomy}' - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization', - 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.policyTagManagerSerializationStub) { - return this.policyTagManagerSerializationStub; - } - - // Put together the "service stub" for - // google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization. - this.policyTagManagerSerializationStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.datacatalog.v1beta1 - .PolicyTagManagerSerialization, - 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 policyTagManagerSerializationStubMethods = [ - 'importTaxonomies', - 'exportTaxonomies', - ]; - for (const methodName of policyTagManagerSerializationStubMethods) { - const callPromise = this.policyTagManagerSerializationStub.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 = undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.policyTagManagerSerializationStub; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - return 'datacatalog.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - return 'datacatalog.googleapis.com'; - } - - /** - * 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 -- - // ------------------- - /** - * Imports all taxonomies and their policy tags to a project as new - * taxonomies. - * - * This method provides a bulk taxonomy / policy tag creation using nested - * proto structure. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of project that the newly created taxonomies will - * belong to. - * @param {google.cloud.datacatalog.v1beta1.InlineSource} request.inlineSource - * Inline source used for taxonomies import - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ImportTaxonomiesResponse]{@link google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager_serialization.import_taxonomies.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ImportTaxonomies_async - */ - importTaxonomies( - request?: protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, - ( - | protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest - | undefined - ), - {} | undefined - ] - >; - importTaxonomies( - request: protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - importTaxonomies( - request: protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - importTaxonomies( - request?: protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse, - ( - | protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesRequest - | 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.importTaxonomies(request, options, callback); - } - /** - * Exports all taxonomies and their policy tags in a project. - * - * This method generates SerializedTaxonomy protos with nested policy tags - * that can be used as an input for future ImportTaxonomies calls. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the project that taxonomies to be exported - * will share. - * @param {string[]} request.taxonomies - * Required. Resource names of the taxonomies to be exported. - * @param {boolean} request.serializedTaxonomies - * Export taxonomies as serialized taxonomies. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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 [ExportTaxonomiesResponse]{@link google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example include:samples/generated/v1beta1/policy_tag_manager_serialization.export_taxonomies.js - * region_tag:datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ExportTaxonomies_async - */ - exportTaxonomies( - request?: protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, - ( - | protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest - | undefined - ), - {} | undefined - ] - >; - exportTaxonomies( - request: protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - exportTaxonomies( - request: protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, - callback: Callback< - protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): void; - exportTaxonomies( - request?: protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, - | protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse, - ( - | protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesRequest - | 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.exportTaxonomies(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified entry resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @returns {string} Resource name string. - */ - entryPath( - project: string, - location: string, - entryGroup: string, - entry: string - ) { - return this.pathTemplates.entryPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - }); - } - - /** - * Parse the project from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).project; - } - - /** - * Parse the location from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).location; - } - - /** - * Parse the entry_group from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry_group; - } - - /** - * Parse the entry from Entry resource. - * - * @param {string} entryName - * A fully-qualified path representing Entry resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromEntryName(entryName: string) { - return this.pathTemplates.entryPathTemplate.match(entryName).entry; - } - - /** - * Return a fully-qualified entryGroup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @returns {string} Resource name string. - */ - entryGroupPath(project: string, location: string, entryGroup: string) { - return this.pathTemplates.entryGroupPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - }); - } - - /** - * Parse the project from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .project; - } - - /** - * Parse the location from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .location; - } - - /** - * Parse the entry_group from EntryGroup resource. - * - * @param {string} entryGroupName - * A fully-qualified path representing EntryGroup resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromEntryGroupName(entryGroupName: string) { - return this.pathTemplates.entryGroupPathTemplate.match(entryGroupName) - .entry_group; - } - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project: string, location: string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified policyTag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @param {string} policy_tag - * @returns {string} Resource name string. - */ - policyTagPath( - project: string, - location: string, - taxonomy: string, - policyTag: string - ) { - return this.pathTemplates.policyTagPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - policy_tag: policyTag, - }); - } - - /** - * Parse the project from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .project; - } - - /** - * Parse the location from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .location; - } - - /** - * Parse the taxonomy from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .taxonomy; - } - - /** - * Parse the policy_tag from PolicyTag resource. - * - * @param {string} policyTagName - * A fully-qualified path representing PolicyTag resource. - * @returns {string} A string representing the policy_tag. - */ - matchPolicyTagFromPolicyTagName(policyTagName: string) { - return this.pathTemplates.policyTagPathTemplate.match(policyTagName) - .policy_tag; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project: string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified tag resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} entry_group - * @param {string} entry - * @param {string} tag - * @returns {string} Resource name string. - */ - tagPath( - project: string, - location: string, - entryGroup: string, - entry: string, - tag: string - ) { - return this.pathTemplates.tagPathTemplate.render({ - project: project, - location: location, - entry_group: entryGroup, - entry: entry, - tag: tag, - }); - } - - /** - * Parse the project from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).project; - } - - /** - * Parse the location from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).location; - } - - /** - * Parse the entry_group from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry_group. - */ - matchEntryGroupFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry_group; - } - - /** - * Parse the entry from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the entry. - */ - matchEntryFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).entry; - } - - /** - * Parse the tag from Tag resource. - * - * @param {string} tagName - * A fully-qualified path representing Tag resource. - * @returns {string} A string representing the tag. - */ - matchTagFromTagName(tagName: string) { - return this.pathTemplates.tagPathTemplate.match(tagName).tag; - } - - /** - * Return a fully-qualified tagTemplate resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @returns {string} Resource name string. - */ - tagTemplatePath(project: string, location: string, tagTemplate: string) { - return this.pathTemplates.tagTemplatePathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - }); - } - - /** - * Parse the project from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .project; - } - - /** - * Parse the location from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .location; - } - - /** - * Parse the tag_template from TagTemplate resource. - * - * @param {string} tagTemplateName - * A fully-qualified path representing TagTemplate resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateName(tagTemplateName: string) { - return this.pathTemplates.tagTemplatePathTemplate.match(tagTemplateName) - .tag_template; - } - - /** - * Return a fully-qualified tagTemplateField resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} tag_template - * @param {string} field - * @returns {string} Resource name string. - */ - tagTemplateFieldPath( - project: string, - location: string, - tagTemplate: string, - field: string - ) { - return this.pathTemplates.tagTemplateFieldPathTemplate.render({ - project: project, - location: location, - tag_template: tagTemplate, - field: field, - }); - } - - /** - * Parse the project from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).project; - } - - /** - * Parse the location from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).location; - } - - /** - * Parse the tag_template from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the tag_template. - */ - matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).tag_template; - } - - /** - * Parse the field from TagTemplateField resource. - * - * @param {string} tagTemplateFieldName - * A fully-qualified path representing TagTemplateField resource. - * @returns {string} A string representing the field. - */ - matchFieldFromTagTemplateFieldName(tagTemplateFieldName: string) { - return this.pathTemplates.tagTemplateFieldPathTemplate.match( - tagTemplateFieldName - ).field; - } - - /** - * Return a fully-qualified taxonomy resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} taxonomy - * @returns {string} Resource name string. - */ - taxonomyPath(project: string, location: string, taxonomy: string) { - return this.pathTemplates.taxonomyPathTemplate.render({ - project: project, - location: location, - taxonomy: taxonomy, - }); - } - - /** - * Parse the project from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the project. - */ - matchProjectFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).project; - } - - /** - * Parse the location from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the location. - */ - matchLocationFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).location; - } - - /** - * Parse the taxonomy from Taxonomy resource. - * - * @param {string} taxonomyName - * A fully-qualified path representing Taxonomy resource. - * @returns {string} A string representing the taxonomy. - */ - matchTaxonomyFromTaxonomyName(taxonomyName: string) { - return this.pathTemplates.taxonomyPathTemplate.match(taxonomyName).taxonomy; - } - - /** - * 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.policyTagManagerSerializationStub && !this._terminated) { - return this.policyTagManagerSerializationStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/src/v1beta1/policy_tag_manager_serialization_client_config.json b/src/v1beta1/policy_tag_manager_serialization_client_config.json deleted file mode 100644 index 1cb5d29c..00000000 --- a/src/v1beta1/policy_tag_manager_serialization_client_config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "interfaces": { - "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization": { - "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": { - "ImportTaxonomies": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExportTaxonomies": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/src/v1beta1/policy_tag_manager_serialization_proto_list.json b/src/v1beta1/policy_tag_manager_serialization_proto_list.json deleted file mode 100644 index e36f6d25..00000000 --- a/src/v1beta1/policy_tag_manager_serialization_proto_list.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - "../../protos/google/cloud/datacatalog/v1beta1/common.proto", - "../../protos/google/cloud/datacatalog/v1beta1/datacatalog.proto", - "../../protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto", - "../../protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto", - "../../protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto", - "../../protos/google/cloud/datacatalog/v1beta1/schema.proto", - "../../protos/google/cloud/datacatalog/v1beta1/search.proto", - "../../protos/google/cloud/datacatalog/v1beta1/table_spec.proto", - "../../protos/google/cloud/datacatalog/v1beta1/tags.proto", - "../../protos/google/cloud/datacatalog/v1beta1/timestamps.proto" -] diff --git a/system-test/fixtures/sample/src/index.js b/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 01f9a4f2..00000000 --- a/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 datacatalog = require('@google-cloud/datacatalog'); - -function main() { - const dataCatalogClient = new datacatalog.DataCatalogClient(); - const policyTagManagerClient = new datacatalog.PolicyTagManagerClient(); - const policyTagManagerSerializationClient = - new datacatalog.PolicyTagManagerSerializationClient(); -} - -main(); diff --git a/system-test/fixtures/sample/src/index.ts b/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index af9272d0..00000000 --- a/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 { - DataCatalogClient, - PolicyTagManagerClient, - PolicyTagManagerSerializationClient, -} from '@google-cloud/datacatalog'; - -// check that the client class type name can be used -function doStuffWithDataCatalogClient(client: DataCatalogClient) { - client.close(); -} -function doStuffWithPolicyTagManagerClient(client: PolicyTagManagerClient) { - client.close(); -} -function doStuffWithPolicyTagManagerSerializationClient( - client: PolicyTagManagerSerializationClient -) { - client.close(); -} - -function main() { - // check that the client instance can be created - const dataCatalogClient = new DataCatalogClient(); - doStuffWithDataCatalogClient(dataCatalogClient); - // check that the client instance can be created - const policyTagManagerClient = new PolicyTagManagerClient(); - doStuffWithPolicyTagManagerClient(policyTagManagerClient); - // check that the client instance can be created - const policyTagManagerSerializationClient = - new PolicyTagManagerSerializationClient(); - doStuffWithPolicyTagManagerSerializationClient( - policyTagManagerSerializationClient - ); -} - -main(); diff --git a/system-test/install.ts b/system-test/install.ts deleted file mode 100644 index 6dd1eaad..00000000 --- a/system-test/install.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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/test/gapic_data_catalog_v1.ts b/test/gapic_data_catalog_v1.ts deleted file mode 100644 index 8533e6f0..00000000 --- a/test/gapic_data_catalog_v1.ts +++ /dev/null @@ -1,5746 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 datacatalogModule 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.DataCatalogClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = datacatalogModule.v1.DataCatalogClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = datacatalogModule.v1.DataCatalogClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = datacatalogModule.v1.DataCatalogClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new datacatalogModule.v1.DataCatalogClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataCatalogStub, undefined); - await client.initialize(); - assert(client.dataCatalogStub); - }); - - it('has close method for the initialized client', done => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.dataCatalogStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataCatalogStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new datacatalogModule.v1.DataCatalogClient({ - 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 datacatalogModule.v1.DataCatalogClient({ - 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('createEntryGroup', () => { - it('invokes createEntryGroup without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.createEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.createEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.createEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryGroup | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryGroup with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createEntryGroup(request), expectedError); - }); - }); - - describe('getEntryGroup', () => { - it('invokes getEntryGroup without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.getEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.getEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.getEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryGroup | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryGroup with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEntryGroup(request), expectedError); - }); - }); - - describe('updateEntryGroup', () => { - it('invokes updateEntryGroup without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.updateEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.updateEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ); - client.innerApiCalls.updateEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryGroup | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryGroup with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateEntryGroup(request), expectedError); - }); - }); - - describe('deleteEntryGroup', () => { - it('invokes deleteEntryGroup without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.deleteEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntryGroup( - 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.deleteEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryGroup with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteEntryGroup(request), expectedError); - }); - }); - - describe('createEntry', () => { - it('invokes createEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.createEntry = stubSimpleCall(expectedResponse); - const [response] = await client.createEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.createEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createEntry(request), expectedError); - }); - }); - - describe('updateEntry', () => { - it('invokes updateEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.updateEntry = stubSimpleCall(expectedResponse); - const [response] = await client.updateEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.updateEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateEntry(request), expectedError); - }); - }); - - describe('deleteEntry', () => { - it('invokes deleteEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntry = stubSimpleCall(expectedResponse); - const [response] = await client.deleteEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntry( - 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.deleteEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteEntry(request), expectedError); - }); - }); - - describe('getEntry', () => { - it('invokes getEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.getEntry = stubSimpleCall(expectedResponse); - const [response] = await client.getEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.getEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEntry = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEntry(request), expectedError); - }); - }); - - describe('lookupEntry', () => { - it('invokes lookupEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.LookupEntryRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.lookupEntry = stubSimpleCall(expectedResponse); - const [response] = await client.lookupEntry(request); - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes lookupEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.LookupEntryRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Entry() - ); - client.innerApiCalls.lookupEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.lookupEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes lookupEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.LookupEntryRequest() - ); - const expectedError = new Error('expected'); - client.innerApiCalls.lookupEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.lookupEntry(request), expectedError); - }); - - it('invokes lookupEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.LookupEntryRequest() - ); - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.lookupEntry(request), expectedError); - }); - }); - - describe('modifyEntryOverview', () => { - it('invokes modifyEntryOverview without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryOverview() - ); - client.innerApiCalls.modifyEntryOverview = - stubSimpleCall(expectedResponse); - const [response] = await client.modifyEntryOverview(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryOverview without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryOverview() - ); - client.innerApiCalls.modifyEntryOverview = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.modifyEntryOverview( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryOverview | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryOverview with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.modifyEntryOverview = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.modifyEntryOverview(request), expectedError); - const actualRequest = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryOverview as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryOverview with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryOverviewRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.modifyEntryOverview(request), expectedError); - }); - }); - - describe('modifyEntryContacts', () => { - it('invokes modifyEntryContacts without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryContactsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryContactsRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Contacts() - ); - client.innerApiCalls.modifyEntryContacts = - stubSimpleCall(expectedResponse); - const [response] = await client.modifyEntryContacts(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryContacts without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryContactsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryContactsRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Contacts() - ); - client.innerApiCalls.modifyEntryContacts = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.modifyEntryContacts( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IContacts | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryContacts with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryContactsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryContactsRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.modifyEntryContacts = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.modifyEntryContacts(request), expectedError); - const actualRequest = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.modifyEntryContacts as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes modifyEntryContacts with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ModifyEntryContactsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ModifyEntryContactsRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.modifyEntryContacts(request), expectedError); - }); - }); - - describe('createTagTemplate', () => { - it('invokes createTagTemplate without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.createTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.createTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.createTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplate with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createTagTemplate(request), expectedError); - }); - }); - - describe('getTagTemplate', () => { - it('invokes getTagTemplate without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.getTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.getTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.getTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTagTemplate with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getTagTemplate(request), expectedError); - }); - }); - - describe('updateTagTemplate', () => { - it('invokes updateTagTemplate without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedHeaderRequestParams = `tag_template.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.updateTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.updateTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedHeaderRequestParams = `tag_template.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplate() - ); - client.innerApiCalls.updateTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplate with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedHeaderRequestParams = `tag_template.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateTagTemplate(request), expectedError); - }); - }); - - describe('deleteTagTemplate', () => { - it('invokes deleteTagTemplate without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTagTemplate( - 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.deleteTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplate with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteTagTemplate(request), expectedError); - }); - }); - - describe('createTagTemplateField', () => { - it('invokes createTagTemplateField without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.createTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.createTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.createTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplateField with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.createTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.createTagTemplateField(request), - expectedError - ); - }); - }); - - describe('updateTagTemplateField', () => { - it('invokes updateTagTemplateField without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.updateTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.updateTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.updateTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplateField with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.updateTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.updateTagTemplateField(request), - expectedError - ); - }); - }); - - describe('renameTagTemplateField', () => { - it('invokes renameTagTemplateField without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.renameTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.renameTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateField with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.renameTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.renameTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.renameTagTemplateField(request), - expectedError - ); - }); - }); - - describe('renameTagTemplateFieldEnumValue', () => { - it('invokes renameTagTemplateFieldEnumValue without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateFieldEnumValue = - stubSimpleCall(expectedResponse); - const [response] = await client.renameTagTemplateFieldEnumValue(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateFieldEnumValue without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateFieldEnumValue = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.renameTagTemplateFieldEnumValue( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateFieldEnumValue with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.renameTagTemplateFieldEnumValue = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.renameTagTemplateFieldEnumValue(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateFieldEnumValue as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateFieldEnumValue with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.RenameTagTemplateFieldEnumValueRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.renameTagTemplateFieldEnumValue(request), - expectedError - ); - }); - }); - - describe('deleteTagTemplateField', () => { - it('invokes deleteTagTemplateField without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.deleteTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTagTemplateField( - 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.deleteTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplateField with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.deleteTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.deleteTagTemplateField(request), - expectedError - ); - }); - }); - - describe('createTag', () => { - it('invokes createTag without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Tag() - ); - client.innerApiCalls.createTag = stubSimpleCall(expectedResponse); - const [response] = await client.createTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Tag() - ); - client.innerApiCalls.createTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createTag(request), expectedError); - }); - }); - - describe('updateTag', () => { - it('invokes updateTag without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Tag() - ); - client.innerApiCalls.updateTag = stubSimpleCall(expectedResponse); - const [response] = await client.updateTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Tag() - ); - client.innerApiCalls.updateTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateTag(request), expectedError); - }); - }); - - describe('deleteTag', () => { - it('invokes deleteTag without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTag( - 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.deleteTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteTag(request), expectedError); - }); - }); - - describe('starEntry', () => { - it('invokes starEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.StarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryResponse() - ); - client.innerApiCalls.starEntry = stubSimpleCall(expectedResponse); - const [response] = await client.starEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes starEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.StarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryResponse() - ); - client.innerApiCalls.starEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.starEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IStarEntryResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes starEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.StarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.starEntry = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.starEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.starEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes starEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.StarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.StarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.starEntry(request), expectedError); - }); - }); - - describe('unstarEntry', () => { - it('invokes unstarEntry without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UnstarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryResponse() - ); - client.innerApiCalls.unstarEntry = stubSimpleCall(expectedResponse); - const [response] = await client.unstarEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes unstarEntry without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UnstarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryResponse() - ); - client.innerApiCalls.unstarEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.unstarEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IUnstarEntryResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes unstarEntry with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UnstarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.unstarEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.unstarEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.unstarEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes unstarEntry with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UnstarEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UnstarEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.unstarEntry(request), expectedError); - }); - }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.setIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setIamPolicy(request), expectedError); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getIamPolicy(request), expectedError); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.ITestIamPermissionsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.testIamPermissions(request), expectedError); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with closed client', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.testIamPermissions(request), expectedError); - }); - }); - - describe('searchCatalog', () => { - it('invokes searchCatalog without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - ]; - client.innerApiCalls.searchCatalog = stubSimpleCall(expectedResponse); - const [response] = await client.searchCatalog(request); - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchCatalog without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - ]; - client.innerApiCalls.searchCatalog = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.searchCatalog( - request, - ( - err?: Error | null, - result?: - | protos.google.cloud.datacatalog.v1.ISearchCatalogResult[] - | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchCatalog with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedError = new Error('expected'); - client.innerApiCalls.searchCatalog = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.searchCatalog(request), expectedError); - }); - - it('invokes searchCatalogStream without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - ]; - client.descriptors.page.searchCatalog.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.searchCatalogStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.SearchCatalogResult[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.datacatalog.v1.SearchCatalogResult - ) => { - 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.searchCatalog.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.searchCatalog, request) - ); - }); - - it('invokes searchCatalogStream with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedError = new Error('expected'); - client.descriptors.page.searchCatalog.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.searchCatalogStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.SearchCatalogResult[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.datacatalog.v1.SearchCatalogResult - ) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.searchCatalog.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.searchCatalog, request) - ); - }); - - it('uses async iteration with searchCatalog without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogResult() - ), - ]; - client.descriptors.page.searchCatalog.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.ISearchCatalogResult[] = - []; - const iterable = client.searchCatalogAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.searchCatalog.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - }); - - it('uses async iteration with searchCatalog with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.SearchCatalogRequest() - ); - const expectedError = new Error('expected'); - client.descriptors.page.searchCatalog.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.searchCatalogAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.ISearchCatalogResult[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.searchCatalog.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - }); - }); - - describe('listEntryGroups', () => { - it('invokes listEntryGroups without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - ]; - client.innerApiCalls.listEntryGroups = stubSimpleCall(expectedResponse); - const [response] = await client.listEntryGroups(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryGroups without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - ]; - client.innerApiCalls.listEntryGroups = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntryGroups( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntryGroup[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryGroups with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEntryGroups = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listEntryGroups(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryGroupsStream without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - ]; - client.descriptors.page.listEntryGroups.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listEntryGroupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.EntryGroup[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.EntryGroup) => { - 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.listEntryGroups.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntryGroups, request) - ); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEntryGroupsStream with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntryGroups.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listEntryGroupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.EntryGroup[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.EntryGroup) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntryGroups, request) - ); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntryGroups without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.EntryGroup() - ), - ]; - client.descriptors.page.listEntryGroups.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.IEntryGroup[] = []; - const iterable = client.listEntryGroupsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listEntryGroups.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listEntryGroups.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntryGroups with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntryGroups.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEntryGroupsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.IEntryGroup[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listEntryGroups.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listEntryGroups.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listEntries', () => { - it('invokes listEntries without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - ]; - client.innerApiCalls.listEntries = stubSimpleCall(expectedResponse); - const [response] = await client.listEntries(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntries without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - ]; - client.innerApiCalls.listEntries = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntries( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IEntry[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntries with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEntries = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listEntries(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntriesStream without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - ]; - client.descriptors.page.listEntries.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listEntriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Entry[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Entry) => { - 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.listEntries.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntries, request) - ); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEntriesStream with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntries.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listEntriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Entry[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Entry) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntries, request) - ); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntries without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Entry()), - ]; - client.descriptors.page.listEntries.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.IEntry[] = []; - const iterable = client.listEntriesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEntries.asyncIterate as SinonStub).getCall( - 0 - ).args[1], - request - ); - assert( - (client.descriptors.page.listEntries.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntries with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntries.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listEntriesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.IEntry[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEntries.asyncIterate as SinonStub).getCall( - 0 - ).args[1], - request - ); - assert( - (client.descriptors.page.listEntries.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listTags', () => { - it('invokes listTags without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - ]; - client.innerApiCalls.listTags = stubSimpleCall(expectedResponse); - const [response] = await client.listTags(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags without error using callback', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - ]; - client.innerApiCalls.listTags = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTags( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITag[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTags = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listTags(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTagsStream without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - ]; - client.descriptors.page.listTags.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Tag[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Tag) => { - 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.listTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTags, request) - ); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listTagsStream with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Tag[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Tag) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTags, request) - ); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTags without error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - generateSampleMessage(new protos.google.cloud.datacatalog.v1.Tag()), - ]; - client.descriptors.page.listTags.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.ITag[] = []; - const iterable = client.listTagsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) - .args[1], - request - ); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTags with error', async () => { - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listTagsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.ITag[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) - .args[1], - request - ); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - describe('entry', () => { - const fakePath = '/rendered/path/entry'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryPath', () => { - const result = client.entryPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryName', () => { - const result = client.matchProjectFromEntryName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryName', () => { - const result = client.matchLocationFromEntryName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryName', () => { - const result = client.matchEntryGroupFromEntryName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromEntryName', () => { - const result = client.matchEntryFromEntryName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('entryGroup', () => { - const fakePath = '/rendered/path/entryGroup'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryGroupPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryGroupPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryGroupPath', () => { - const result = client.entryGroupPath( - 'projectValue', - 'locationValue', - 'entryGroupValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryGroupPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryGroupName', () => { - const result = client.matchProjectFromEntryGroupName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryGroupName', () => { - const result = client.matchLocationFromEntryGroupName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryGroupName', () => { - const result = client.matchEntryGroupFromEntryGroupName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('location', () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('policyTag', () => { - const fakePath = '/rendered/path/policyTag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - policy_tag: 'policyTagValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.policyTagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.policyTagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('policyTagPath', () => { - const result = client.policyTagPath( - 'projectValue', - 'locationValue', - 'taxonomyValue', - 'policyTagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.policyTagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromPolicyTagName', () => { - const result = client.matchProjectFromPolicyTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromPolicyTagName', () => { - const result = client.matchLocationFromPolicyTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromPolicyTagName', () => { - const result = client.matchTaxonomyFromPolicyTagName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchPolicyTagFromPolicyTagName', () => { - const result = client.matchPolicyTagFromPolicyTagName(fakePath); - assert.strictEqual(result, 'policyTagValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('project', () => { - const fakePath = '/rendered/path/project'; - const expectedParameters = { - project: 'projectValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath('projectValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tag', () => { - const fakePath = '/rendered/path/tag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - tag: 'tagValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagPath', () => { - const result = client.tagPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue', - 'tagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagName', () => { - const result = client.matchProjectFromTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagName', () => { - const result = client.matchLocationFromTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromTagName', () => { - const result = client.matchEntryGroupFromTagName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromTagName', () => { - const result = client.matchEntryFromTagName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagFromTagName', () => { - const result = client.matchTagFromTagName(fakePath); - assert.strictEqual(result, 'tagValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplate', () => { - const fakePath = '/rendered/path/tagTemplate'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplatePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplatePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplatePath', () => { - const result = client.tagTemplatePath( - 'projectValue', - 'locationValue', - 'tagTemplateValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagTemplatePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateName', () => { - const result = client.matchProjectFromTagTemplateName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateName', () => { - const result = client.matchLocationFromTagTemplateName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateName', () => { - const result = client.matchTagTemplateFromTagTemplateName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplateField', () => { - const fakePath = '/rendered/path/tagTemplateField'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - field: 'fieldValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplateFieldPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplateFieldPath', () => { - const result = client.tagTemplateFieldPath( - 'projectValue', - 'locationValue', - 'tagTemplateValue', - 'fieldValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.tagTemplateFieldPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateFieldName', () => { - const result = client.matchProjectFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateFieldName', () => { - const result = client.matchLocationFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateFieldName', () => { - const result = - client.matchTagTemplateFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchFieldFromTagTemplateFieldName', () => { - const result = client.matchFieldFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'fieldValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplateFieldEnumValue', () => { - const fakePath = '/rendered/path/tagTemplateFieldEnumValue'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - tag_template_field_id: 'tagTemplateFieldIdValue', - enum_value_display_name: 'enumValueDisplayNameValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplateFieldEnumValuePath', () => { - const result = client.tagTemplateFieldEnumValuePath( - 'projectValue', - 'locationValue', - 'tagTemplateValue', - 'tagTemplateFieldIdValue', - 'enumValueDisplayNameValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchProjectFromTagTemplateFieldEnumValueName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchLocationFromTagTemplateFieldEnumValueName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchTagTemplateFromTagTemplateFieldEnumValueName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFieldIdFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchTagTemplateFieldIdFromTagTemplateFieldEnumValueName( - fakePath - ); - assert.strictEqual(result, 'tagTemplateFieldIdValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEnumValueDisplayNameFromTagTemplateFieldEnumValueName', () => { - const result = - client.matchEnumValueDisplayNameFromTagTemplateFieldEnumValueName( - fakePath - ); - assert.strictEqual(result, 'enumValueDisplayNameValue'); - assert( - ( - client.pathTemplates.tagTemplateFieldEnumValuePathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('taxonomy', () => { - const fakePath = '/rendered/path/taxonomy'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - }; - const client = new datacatalogModule.v1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taxonomyPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.taxonomyPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('taxonomyPath', () => { - const result = client.taxonomyPath( - 'projectValue', - 'locationValue', - 'taxonomyValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.taxonomyPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTaxonomyName', () => { - const result = client.matchProjectFromTaxonomyName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTaxonomyName', () => { - const result = client.matchLocationFromTaxonomyName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromTaxonomyName', () => { - const result = client.matchTaxonomyFromTaxonomyName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - }); -}); diff --git a/test/gapic_data_catalog_v1beta1.ts b/test/gapic_data_catalog_v1beta1.ts deleted file mode 100644 index 3ecf5b35..00000000 --- a/test/gapic_data_catalog_v1beta1.ts +++ /dev/null @@ -1,5031 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 datacatalogModule 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.DataCatalogClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = - datacatalogModule.v1beta1.DataCatalogClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - datacatalogModule.v1beta1.DataCatalogClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = datacatalogModule.v1beta1.DataCatalogClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataCatalogStub, undefined); - await client.initialize(); - assert(client.dataCatalogStub); - }); - - it('has close method for the initialized client', done => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.dataCatalogStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.dataCatalogStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - 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 datacatalogModule.v1beta1.DataCatalogClient({ - 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('createEntryGroup', () => { - it('invokes createEntryGroup without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ); - client.innerApiCalls.createEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.createEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ); - client.innerApiCalls.createEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IEntryGroup | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryGroup with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createEntryGroup(request), expectedError); - }); - }); - - describe('updateEntryGroup', () => { - it('invokes updateEntryGroup without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ); - client.innerApiCalls.updateEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.updateEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ); - client.innerApiCalls.updateEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IEntryGroup | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryGroup with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedHeaderRequestParams = `entry_group.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest() - ); - request.entryGroup ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest', - ['entryGroup', 'name'] - ); - request.entryGroup.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateEntryGroup(request), expectedError); - }); - }); - - describe('getEntryGroup', () => { - it('invokes getEntryGroup without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ); - client.innerApiCalls.getEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.getEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ); - client.innerApiCalls.getEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntryGroup( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IEntryGroup | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryGroup with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEntryGroup(request), expectedError); - }); - }); - - describe('deleteEntryGroup', () => { - it('invokes deleteEntryGroup without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntryGroup = stubSimpleCall(expectedResponse); - const [response] = await client.deleteEntryGroup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryGroup without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntryGroup = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntryGroup( - 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.deleteEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryGroup with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntryGroup = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteEntryGroup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntryGroup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntryGroup with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteEntryGroup(request), expectedError); - }); - }); - - describe('createEntry', () => { - it('invokes createEntry without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ); - client.innerApiCalls.createEntry = stubSimpleCall(expectedResponse); - const [response] = await client.createEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntry without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ); - client.innerApiCalls.createEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntry with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEntry with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateEntryRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createEntry(request), expectedError); - }); - }); - - describe('updateEntry', () => { - it('invokes updateEntry without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ); - client.innerApiCalls.updateEntry = stubSimpleCall(expectedResponse); - const [response] = await client.updateEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntry without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ); - client.innerApiCalls.updateEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntry with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedHeaderRequestParams = `entry.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEntry with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateEntryRequest() - ); - request.entry ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateEntryRequest', - ['entry', 'name'] - ); - request.entry.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateEntry(request), expectedError); - }); - }); - - describe('deleteEntry', () => { - it('invokes deleteEntry without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntry = stubSimpleCall(expectedResponse); - const [response] = await client.deleteEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntry without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEntry( - 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.deleteEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntry with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEntry with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteEntry(request), expectedError); - }); - }); - - describe('getEntry', () => { - it('invokes getEntry without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ); - client.innerApiCalls.getEntry = stubSimpleCall(expectedResponse); - const [response] = await client.getEntry(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntry without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ); - client.innerApiCalls.getEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntry with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEntry = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEntry(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getEntry as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEntry with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetEntryRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetEntryRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEntry(request), expectedError); - }); - }); - - describe('lookupEntry', () => { - it('invokes lookupEntry without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.LookupEntryRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ); - client.innerApiCalls.lookupEntry = stubSimpleCall(expectedResponse); - const [response] = await client.lookupEntry(request); - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes lookupEntry without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.LookupEntryRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ); - client.innerApiCalls.lookupEntry = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.lookupEntry( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IEntry | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes lookupEntry with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.LookupEntryRequest() - ); - const expectedError = new Error('expected'); - client.innerApiCalls.lookupEntry = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.lookupEntry(request), expectedError); - }); - - it('invokes lookupEntry with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.LookupEntryRequest() - ); - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.lookupEntry(request), expectedError); - }); - }); - - describe('createTagTemplate', () => { - it('invokes createTagTemplate without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplate() - ); - client.innerApiCalls.createTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.createTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplate() - ); - client.innerApiCalls.createTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITagTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplate with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createTagTemplate(request), expectedError); - }); - }); - - describe('getTagTemplate', () => { - it('invokes getTagTemplate without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplate() - ); - client.innerApiCalls.getTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.getTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplate() - ); - client.innerApiCalls.getTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITagTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTagTemplate with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getTagTemplate(request), expectedError); - }); - }); - - describe('updateTagTemplate', () => { - it('invokes updateTagTemplate without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedHeaderRequestParams = `tag_template.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplate() - ); - client.innerApiCalls.updateTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.updateTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedHeaderRequestParams = `tag_template.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplate() - ); - client.innerApiCalls.updateTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTagTemplate( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITagTemplate | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplate with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedHeaderRequestParams = `tag_template.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest() - ); - request.tagTemplate ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest', - ['tagTemplate', 'name'] - ); - request.tagTemplate.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateTagTemplate(request), expectedError); - }); - }); - - describe('deleteTagTemplate', () => { - it('invokes deleteTagTemplate without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplate = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTagTemplate(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplate without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplate = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTagTemplate( - 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.deleteTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplate with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTagTemplate = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteTagTemplate(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplate as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplate with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteTagTemplate(request), expectedError); - }); - }); - - describe('createTagTemplateField', () => { - it('invokes createTagTemplateField without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplateField() - ); - client.innerApiCalls.createTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.createTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplateField() - ); - client.innerApiCalls.createTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplateField with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.createTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.createTagTemplateField(request), - expectedError - ); - }); - }); - - describe('updateTagTemplateField', () => { - it('invokes updateTagTemplateField without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplateField() - ); - client.innerApiCalls.updateTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.updateTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplateField() - ); - client.innerApiCalls.updateTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplateField with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.updateTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.updateTagTemplateField(request), - expectedError - ); - }); - }); - - describe('renameTagTemplateField', () => { - it('invokes renameTagTemplateField without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.renameTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.TagTemplateField() - ); - client.innerApiCalls.renameTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.renameTagTemplateField( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITagTemplateField | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateField with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.renameTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.renameTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.renameTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes renameTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.renameTagTemplateField(request), - expectedError - ); - }); - }); - - describe('deleteTagTemplateField', () => { - it('invokes deleteTagTemplateField without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplateField = - stubSimpleCall(expectedResponse); - const [response] = await client.deleteTagTemplateField(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplateField without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTagTemplateField = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTagTemplateField( - 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.deleteTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplateField with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTagTemplateField = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.deleteTagTemplateField(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTagTemplateField as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTagTemplateField with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.deleteTagTemplateField(request), - expectedError - ); - }); - }); - - describe('createTag', () => { - it('invokes createTag without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ); - client.innerApiCalls.createTag = stubSimpleCall(expectedResponse); - const [response] = await client.createTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ); - client.innerApiCalls.createTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTag with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createTag(request), expectedError); - }); - }); - - describe('updateTag', () => { - it('invokes updateTag without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ); - client.innerApiCalls.updateTag = stubSimpleCall(expectedResponse); - const [response] = await client.updateTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ); - client.innerApiCalls.updateTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedHeaderRequestParams = `tag.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTag with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTagRequest() - ); - request.tag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTagRequest', - ['tag', 'name'] - ); - request.tag.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateTag(request), expectedError); - }); - }); - - describe('deleteTag', () => { - it('invokes deleteTag without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTag( - 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.deleteTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTag = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTag with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteTag(request), expectedError); - }); - }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.setIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setIamPolicy(request), expectedError); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getIamPolicy(request), expectedError); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.ITestIamPermissionsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.testIamPermissions(request), expectedError); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with closed client', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.testIamPermissions(request), expectedError); - }); - }); - - describe('searchCatalog', () => { - it('invokes searchCatalog without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - ]; - client.innerApiCalls.searchCatalog = stubSimpleCall(expectedResponse); - const [response] = await client.searchCatalog(request); - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchCatalog without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - ]; - client.innerApiCalls.searchCatalog = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.searchCatalog( - request, - ( - err?: Error | null, - result?: - | protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[] - | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchCatalog with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogRequest() - ); - const expectedError = new Error('expected'); - client.innerApiCalls.searchCatalog = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.searchCatalog(request), expectedError); - }); - - it('invokes searchCatalogStream without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - ]; - client.descriptors.page.searchCatalog.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.searchCatalogStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult - ) => { - 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.searchCatalog.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.searchCatalog, request) - ); - }); - - it('invokes searchCatalogStream with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogRequest() - ); - const expectedError = new Error('expected'); - client.descriptors.page.searchCatalog.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.searchCatalogStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult - ) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.searchCatalog.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.searchCatalog, request) - ); - }); - - it('uses async iteration with searchCatalog without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogResult() - ), - ]; - client.descriptors.page.searchCatalog.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[] = - []; - const iterable = client.searchCatalogAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.searchCatalog.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - }); - - it('uses async iteration with searchCatalog with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.SearchCatalogRequest() - ); - const expectedError = new Error('expected'); - client.descriptors.page.searchCatalog.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.searchCatalogAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1beta1.ISearchCatalogResult[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.searchCatalog.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - }); - }); - - describe('listEntryGroups', () => { - it('invokes listEntryGroups without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - ]; - client.innerApiCalls.listEntryGroups = stubSimpleCall(expectedResponse); - const [response] = await client.listEntryGroups(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryGroups without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - ]; - client.innerApiCalls.listEntryGroups = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntryGroups( - request, - ( - err?: Error | null, - result?: - | protos.google.cloud.datacatalog.v1beta1.IEntryGroup[] - | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryGroups with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEntryGroups = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listEntryGroups(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntryGroups as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntryGroupsStream without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - ]; - client.descriptors.page.listEntryGroups.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listEntryGroupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.EntryGroup[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.EntryGroup) => { - 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.listEntryGroups.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntryGroups, request) - ); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEntryGroupsStream with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntryGroups.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listEntryGroupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.EntryGroup[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.EntryGroup) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntryGroups, request) - ); - assert( - (client.descriptors.page.listEntryGroups.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntryGroups without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.EntryGroup() - ), - ]; - client.descriptors.page.listEntryGroups.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1beta1.IEntryGroup[] = - []; - const iterable = client.listEntryGroupsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listEntryGroups.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listEntryGroups.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntryGroups with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntryGroups.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEntryGroupsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1beta1.IEntryGroup[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listEntryGroups.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listEntryGroups.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listEntries', () => { - it('invokes listEntries without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - ]; - client.innerApiCalls.listEntries = stubSimpleCall(expectedResponse); - const [response] = await client.listEntries(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntries without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - ]; - client.innerApiCalls.listEntries = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEntries( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IEntry[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntries with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEntries = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listEntries(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listEntries as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEntriesStream without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - ]; - client.descriptors.page.listEntries.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listEntriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.Entry[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.Entry) => { - 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.listEntries.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntries, request) - ); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEntriesStream with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntries.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listEntriesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.Entry[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.Entry) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listEntries, request) - ); - assert( - (client.descriptors.page.listEntries.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntries without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Entry() - ), - ]; - client.descriptors.page.listEntries.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1beta1.IEntry[] = []; - const iterable = client.listEntriesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEntries.asyncIterate as SinonStub).getCall( - 0 - ).args[1], - request - ); - assert( - (client.descriptors.page.listEntries.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEntries with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListEntriesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListEntriesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEntries.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listEntriesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1beta1.IEntry[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEntries.asyncIterate as SinonStub).getCall( - 0 - ).args[1], - request - ); - assert( - (client.descriptors.page.listEntries.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listTags', () => { - it('invokes listTags without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - ]; - client.innerApiCalls.listTags = stubSimpleCall(expectedResponse); - const [response] = await client.listTags(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags without error using callback', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - ]; - client.innerApiCalls.listTags = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTags( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITag[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTags with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTags = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listTags(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTagsStream without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - ]; - client.descriptors.page.listTags.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.Tag[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.Tag) => { - 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.listTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTags, request) - ); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listTagsStream with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.Tag[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.Tag) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTags, request) - ); - assert( - (client.descriptors.page.listTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTags without error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Tag() - ), - ]; - client.descriptors.page.listTags.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1beta1.ITag[] = []; - const iterable = client.listTagsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) - .args[1], - request - ); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTags with error', async () => { - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTags.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listTagsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1beta1.ITag[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listTags.asyncIterate as SinonStub).getCall(0) - .args[1], - request - ); - assert( - (client.descriptors.page.listTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - describe('entry', () => { - const fakePath = '/rendered/path/entry'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - }; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryPath', () => { - const result = client.entryPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryName', () => { - const result = client.matchProjectFromEntryName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryName', () => { - const result = client.matchLocationFromEntryName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryName', () => { - const result = client.matchEntryGroupFromEntryName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromEntryName', () => { - const result = client.matchEntryFromEntryName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('entryGroup', () => { - const fakePath = '/rendered/path/entryGroup'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - }; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryGroupPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryGroupPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryGroupPath', () => { - const result = client.entryGroupPath( - 'projectValue', - 'locationValue', - 'entryGroupValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryGroupPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryGroupName', () => { - const result = client.matchProjectFromEntryGroupName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryGroupName', () => { - const result = client.matchLocationFromEntryGroupName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryGroupName', () => { - const result = client.matchEntryGroupFromEntryGroupName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('location', () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('policyTag', () => { - const fakePath = '/rendered/path/policyTag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - policy_tag: 'policyTagValue', - }; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.policyTagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.policyTagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('policyTagPath', () => { - const result = client.policyTagPath( - 'projectValue', - 'locationValue', - 'taxonomyValue', - 'policyTagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.policyTagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromPolicyTagName', () => { - const result = client.matchProjectFromPolicyTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromPolicyTagName', () => { - const result = client.matchLocationFromPolicyTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromPolicyTagName', () => { - const result = client.matchTaxonomyFromPolicyTagName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchPolicyTagFromPolicyTagName', () => { - const result = client.matchPolicyTagFromPolicyTagName(fakePath); - assert.strictEqual(result, 'policyTagValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('project', () => { - const fakePath = '/rendered/path/project'; - const expectedParameters = { - project: 'projectValue', - }; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath('projectValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tag', () => { - const fakePath = '/rendered/path/tag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - tag: 'tagValue', - }; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagPath', () => { - const result = client.tagPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue', - 'tagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagName', () => { - const result = client.matchProjectFromTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagName', () => { - const result = client.matchLocationFromTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromTagName', () => { - const result = client.matchEntryGroupFromTagName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromTagName', () => { - const result = client.matchEntryFromTagName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagFromTagName', () => { - const result = client.matchTagFromTagName(fakePath); - assert.strictEqual(result, 'tagValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplate', () => { - const fakePath = '/rendered/path/tagTemplate'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - }; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplatePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplatePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplatePath', () => { - const result = client.tagTemplatePath( - 'projectValue', - 'locationValue', - 'tagTemplateValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagTemplatePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateName', () => { - const result = client.matchProjectFromTagTemplateName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateName', () => { - const result = client.matchLocationFromTagTemplateName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateName', () => { - const result = client.matchTagTemplateFromTagTemplateName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplateField', () => { - const fakePath = '/rendered/path/tagTemplateField'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - field: 'fieldValue', - }; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplateFieldPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplateFieldPath', () => { - const result = client.tagTemplateFieldPath( - 'projectValue', - 'locationValue', - 'tagTemplateValue', - 'fieldValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.tagTemplateFieldPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateFieldName', () => { - const result = client.matchProjectFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateFieldName', () => { - const result = client.matchLocationFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateFieldName', () => { - const result = - client.matchTagTemplateFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchFieldFromTagTemplateFieldName', () => { - const result = client.matchFieldFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'fieldValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('taxonomy', () => { - const fakePath = '/rendered/path/taxonomy'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - }; - const client = new datacatalogModule.v1beta1.DataCatalogClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taxonomyPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.taxonomyPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('taxonomyPath', () => { - const result = client.taxonomyPath( - 'projectValue', - 'locationValue', - 'taxonomyValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.taxonomyPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTaxonomyName', () => { - const result = client.matchProjectFromTaxonomyName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTaxonomyName', () => { - const result = client.matchLocationFromTaxonomyName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromTaxonomyName', () => { - const result = client.matchTaxonomyFromTaxonomyName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - }); -}); diff --git a/test/gapic_policy_tag_manager_serialization_v1.ts b/test/gapic_policy_tag_manager_serialization_v1.ts deleted file mode 100644 index b6133954..00000000 --- a/test/gapic_policy_tag_manager_serialization_v1.ts +++ /dev/null @@ -1,1243 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 policytagmanagerserializationModule from '../src'; - -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); -} - -describe('v1.PolicyTagManagerSerializationClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = - policytagmanagerserializationModule.v1 - .PolicyTagManagerSerializationClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - policytagmanagerserializationModule.v1 - .PolicyTagManagerSerializationClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = - policytagmanagerserializationModule.v1 - .PolicyTagManagerSerializationClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - fallback: true, - } - ); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.policyTagManagerSerializationStub, undefined); - await client.initialize(); - assert(client.policyTagManagerSerializationStub); - }); - - it('has close method for the initialized client', done => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - assert(client.policyTagManagerSerializationStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.policyTagManagerSerializationStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - 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 policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - 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('replaceTaxonomy', () => { - it('invokes replaceTaxonomy without error', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ); - client.innerApiCalls.replaceTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.replaceTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.replaceTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.replaceTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes replaceTaxonomy without error using callback', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ); - client.innerApiCalls.replaceTaxonomy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.replaceTaxonomy( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITaxonomy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.replaceTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.replaceTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes replaceTaxonomy with error', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.replaceTaxonomy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.replaceTaxonomy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.replaceTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.replaceTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes replaceTaxonomy with closed client', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ReplaceTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.replaceTaxonomy(request), expectedError); - }); - }); - - describe('importTaxonomies', () => { - it('invokes importTaxonomies without error', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ImportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportTaxonomiesResponse() - ); - client.innerApiCalls.importTaxonomies = stubSimpleCall(expectedResponse); - const [response] = await client.importTaxonomies(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importTaxonomies without error using callback', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ImportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportTaxonomiesResponse() - ); - client.innerApiCalls.importTaxonomies = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.importTaxonomies( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IImportTaxonomiesResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importTaxonomies with error', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ImportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importTaxonomies = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.importTaxonomies(request), expectedError); - const actualRequest = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importTaxonomies with closed client', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ImportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ImportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.importTaxonomies(request), expectedError); - }); - }); - - describe('exportTaxonomies', () => { - it('invokes exportTaxonomies without error', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ExportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ExportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ExportTaxonomiesResponse() - ); - client.innerApiCalls.exportTaxonomies = stubSimpleCall(expectedResponse); - const [response] = await client.exportTaxonomies(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportTaxonomies without error using callback', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ExportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ExportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ExportTaxonomiesResponse() - ); - client.innerApiCalls.exportTaxonomies = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.exportTaxonomies( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IExportTaxonomiesResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportTaxonomies with error', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ExportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ExportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportTaxonomies = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.exportTaxonomies(request), expectedError); - const actualRequest = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportTaxonomies with closed client', async () => { - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ExportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ExportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.exportTaxonomies(request), expectedError); - }); - }); - - describe('Path templates', () => { - describe('entry', () => { - const fakePath = '/rendered/path/entry'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - }; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.entryPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryPath', () => { - const result = client.entryPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryName', () => { - const result = client.matchProjectFromEntryName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryName', () => { - const result = client.matchLocationFromEntryName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryName', () => { - const result = client.matchEntryGroupFromEntryName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromEntryName', () => { - const result = client.matchEntryFromEntryName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('entryGroup', () => { - const fakePath = '/rendered/path/entryGroup'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - }; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.entryGroupPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryGroupPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryGroupPath', () => { - const result = client.entryGroupPath( - 'projectValue', - 'locationValue', - 'entryGroupValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryGroupPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryGroupName', () => { - const result = client.matchProjectFromEntryGroupName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryGroupName', () => { - const result = client.matchLocationFromEntryGroupName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryGroupName', () => { - const result = client.matchEntryGroupFromEntryGroupName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('location', () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('policyTag', () => { - const fakePath = '/rendered/path/policyTag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - policy_tag: 'policyTagValue', - }; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.policyTagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.policyTagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('policyTagPath', () => { - const result = client.policyTagPath( - 'projectValue', - 'locationValue', - 'taxonomyValue', - 'policyTagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.policyTagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromPolicyTagName', () => { - const result = client.matchProjectFromPolicyTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromPolicyTagName', () => { - const result = client.matchLocationFromPolicyTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromPolicyTagName', () => { - const result = client.matchTaxonomyFromPolicyTagName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchPolicyTagFromPolicyTagName', () => { - const result = client.matchPolicyTagFromPolicyTagName(fakePath); - assert.strictEqual(result, 'policyTagValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('project', () => { - const fakePath = '/rendered/path/project'; - const expectedParameters = { - project: 'projectValue', - }; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath('projectValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tag', () => { - const fakePath = '/rendered/path/tag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - tag: 'tagValue', - }; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.tagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagPath', () => { - const result = client.tagPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue', - 'tagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagName', () => { - const result = client.matchProjectFromTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagName', () => { - const result = client.matchLocationFromTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromTagName', () => { - const result = client.matchEntryGroupFromTagName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromTagName', () => { - const result = client.matchEntryFromTagName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagFromTagName', () => { - const result = client.matchTagFromTagName(fakePath); - assert.strictEqual(result, 'tagValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplate', () => { - const fakePath = '/rendered/path/tagTemplate'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - }; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.tagTemplatePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplatePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplatePath', () => { - const result = client.tagTemplatePath( - 'projectValue', - 'locationValue', - 'tagTemplateValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagTemplatePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateName', () => { - const result = client.matchProjectFromTagTemplateName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateName', () => { - const result = client.matchLocationFromTagTemplateName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateName', () => { - const result = client.matchTagTemplateFromTagTemplateName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplateField', () => { - const fakePath = '/rendered/path/tagTemplateField'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - field: 'fieldValue', - }; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplateFieldPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplateFieldPath', () => { - const result = client.tagTemplateFieldPath( - 'projectValue', - 'locationValue', - 'tagTemplateValue', - 'fieldValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.tagTemplateFieldPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateFieldName', () => { - const result = client.matchProjectFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateFieldName', () => { - const result = client.matchLocationFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateFieldName', () => { - const result = - client.matchTagTemplateFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchFieldFromTagTemplateFieldName', () => { - const result = client.matchFieldFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'fieldValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('taxonomy', () => { - const fakePath = '/rendered/path/taxonomy'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - }; - const client = - new policytagmanagerserializationModule.v1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.taxonomyPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.taxonomyPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('taxonomyPath', () => { - const result = client.taxonomyPath( - 'projectValue', - 'locationValue', - 'taxonomyValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.taxonomyPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTaxonomyName', () => { - const result = client.matchProjectFromTaxonomyName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTaxonomyName', () => { - const result = client.matchLocationFromTaxonomyName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromTaxonomyName', () => { - const result = client.matchTaxonomyFromTaxonomyName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - }); -}); diff --git a/test/gapic_policy_tag_manager_serialization_v1beta1.ts b/test/gapic_policy_tag_manager_serialization_v1beta1.ts deleted file mode 100644 index 8bedd5b9..00000000 --- a/test/gapic_policy_tag_manager_serialization_v1beta1.ts +++ /dev/null @@ -1,1101 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 policytagmanagerserializationModule from '../src'; - -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); -} - -describe('v1beta1.PolicyTagManagerSerializationClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = - policytagmanagerserializationModule.v1beta1 - .PolicyTagManagerSerializationClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - policytagmanagerserializationModule.v1beta1 - .PolicyTagManagerSerializationClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = - policytagmanagerserializationModule.v1beta1 - .PolicyTagManagerSerializationClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - fallback: true, - } - ); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.policyTagManagerSerializationStub, undefined); - await client.initialize(); - assert(client.policyTagManagerSerializationStub); - }); - - it('has close method for the initialized client', done => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - assert(client.policyTagManagerSerializationStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.policyTagManagerSerializationStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - 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 policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - 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('importTaxonomies', () => { - it('invokes importTaxonomies without error', async () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse() - ); - client.innerApiCalls.importTaxonomies = stubSimpleCall(expectedResponse); - const [response] = await client.importTaxonomies(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importTaxonomies without error using callback', async () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse() - ); - client.innerApiCalls.importTaxonomies = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.importTaxonomies( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IImportTaxonomiesResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importTaxonomies with error', async () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importTaxonomies = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.importTaxonomies(request), expectedError); - const actualRequest = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importTaxonomies with closed client', async () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.importTaxonomies(request), expectedError); - }); - }); - - describe('exportTaxonomies', () => { - it('invokes exportTaxonomies without error', async () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse() - ); - client.innerApiCalls.exportTaxonomies = stubSimpleCall(expectedResponse); - const [response] = await client.exportTaxonomies(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportTaxonomies without error using callback', async () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse() - ); - client.innerApiCalls.exportTaxonomies = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.exportTaxonomies( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IExportTaxonomiesResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportTaxonomies with error', async () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportTaxonomies = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.exportTaxonomies(request), expectedError); - const actualRequest = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes exportTaxonomies with closed client', async () => { - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.exportTaxonomies(request), expectedError); - }); - }); - - describe('Path templates', () => { - describe('entry', () => { - const fakePath = '/rendered/path/entry'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - }; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.entryPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryPath', () => { - const result = client.entryPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryName', () => { - const result = client.matchProjectFromEntryName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryName', () => { - const result = client.matchLocationFromEntryName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryName', () => { - const result = client.matchEntryGroupFromEntryName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromEntryName', () => { - const result = client.matchEntryFromEntryName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('entryGroup', () => { - const fakePath = '/rendered/path/entryGroup'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - }; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.entryGroupPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryGroupPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryGroupPath', () => { - const result = client.entryGroupPath( - 'projectValue', - 'locationValue', - 'entryGroupValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryGroupPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryGroupName', () => { - const result = client.matchProjectFromEntryGroupName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryGroupName', () => { - const result = client.matchLocationFromEntryGroupName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryGroupName', () => { - const result = client.matchEntryGroupFromEntryGroupName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('location', () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('policyTag', () => { - const fakePath = '/rendered/path/policyTag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - policy_tag: 'policyTagValue', - }; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.policyTagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.policyTagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('policyTagPath', () => { - const result = client.policyTagPath( - 'projectValue', - 'locationValue', - 'taxonomyValue', - 'policyTagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.policyTagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromPolicyTagName', () => { - const result = client.matchProjectFromPolicyTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromPolicyTagName', () => { - const result = client.matchLocationFromPolicyTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromPolicyTagName', () => { - const result = client.matchTaxonomyFromPolicyTagName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchPolicyTagFromPolicyTagName', () => { - const result = client.matchPolicyTagFromPolicyTagName(fakePath); - assert.strictEqual(result, 'policyTagValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('project', () => { - const fakePath = '/rendered/path/project'; - const expectedParameters = { - project: 'projectValue', - }; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath('projectValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tag', () => { - const fakePath = '/rendered/path/tag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - tag: 'tagValue', - }; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.tagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagPath', () => { - const result = client.tagPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue', - 'tagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagName', () => { - const result = client.matchProjectFromTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagName', () => { - const result = client.matchLocationFromTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromTagName', () => { - const result = client.matchEntryGroupFromTagName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromTagName', () => { - const result = client.matchEntryFromTagName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagFromTagName', () => { - const result = client.matchTagFromTagName(fakePath); - assert.strictEqual(result, 'tagValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplate', () => { - const fakePath = '/rendered/path/tagTemplate'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - }; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.tagTemplatePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplatePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplatePath', () => { - const result = client.tagTemplatePath( - 'projectValue', - 'locationValue', - 'tagTemplateValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagTemplatePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateName', () => { - const result = client.matchProjectFromTagTemplateName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateName', () => { - const result = client.matchLocationFromTagTemplateName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateName', () => { - const result = client.matchTagTemplateFromTagTemplateName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplateField', () => { - const fakePath = '/rendered/path/tagTemplateField'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - field: 'fieldValue', - }; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplateFieldPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplateFieldPath', () => { - const result = client.tagTemplateFieldPath( - 'projectValue', - 'locationValue', - 'tagTemplateValue', - 'fieldValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.tagTemplateFieldPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateFieldName', () => { - const result = client.matchProjectFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateFieldName', () => { - const result = client.matchLocationFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateFieldName', () => { - const result = - client.matchTagTemplateFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchFieldFromTagTemplateFieldName', () => { - const result = client.matchFieldFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'fieldValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('taxonomy', () => { - const fakePath = '/rendered/path/taxonomy'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - }; - const client = - new policytagmanagerserializationModule.v1beta1.PolicyTagManagerSerializationClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.taxonomyPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.taxonomyPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('taxonomyPath', () => { - const result = client.taxonomyPath( - 'projectValue', - 'locationValue', - 'taxonomyValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.taxonomyPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTaxonomyName', () => { - const result = client.matchProjectFromTaxonomyName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTaxonomyName', () => { - const result = client.matchLocationFromTaxonomyName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromTaxonomyName', () => { - const result = client.matchTaxonomyFromTaxonomyName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - }); -}); diff --git a/test/gapic_policy_tag_manager_v1.ts b/test/gapic_policy_tag_manager_v1.ts deleted file mode 100644 index d37e1dae..00000000 --- a/test/gapic_policy_tag_manager_v1.ts +++ /dev/null @@ -1,2919 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 policytagmanagerModule 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.PolicyTagManagerClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = - policytagmanagerModule.v1.PolicyTagManagerClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - policytagmanagerModule.v1.PolicyTagManagerClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = policytagmanagerModule.v1.PolicyTagManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.policyTagManagerStub, undefined); - await client.initialize(); - assert(client.policyTagManagerStub); - }); - - it('has close method for the initialized client', done => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.policyTagManagerStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.policyTagManagerStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - 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 policytagmanagerModule.v1.PolicyTagManagerClient({ - 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('createTaxonomy', () => { - it('invokes createTaxonomy without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTaxonomyRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ); - client.innerApiCalls.createTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.createTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTaxonomy without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTaxonomyRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ); - client.innerApiCalls.createTaxonomy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTaxonomy( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITaxonomy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTaxonomy with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTaxonomyRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTaxonomy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createTaxonomy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTaxonomy with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreateTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreateTaxonomyRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createTaxonomy(request), expectedError); - }); - }); - - describe('deleteTaxonomy', () => { - it('invokes deleteTaxonomy without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTaxonomy without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTaxonomy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTaxonomy( - 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.deleteTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTaxonomy with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTaxonomy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteTaxonomy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTaxonomy with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeleteTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeleteTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteTaxonomy(request), expectedError); - }); - }); - - describe('updateTaxonomy', () => { - it('invokes updateTaxonomy without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTaxonomyRequest() - ); - request.taxonomy ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTaxonomyRequest', - ['taxonomy', 'name'] - ); - request.taxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `taxonomy.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ); - client.innerApiCalls.updateTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.updateTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTaxonomy without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTaxonomyRequest() - ); - request.taxonomy ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTaxonomyRequest', - ['taxonomy', 'name'] - ); - request.taxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `taxonomy.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ); - client.innerApiCalls.updateTaxonomy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTaxonomy( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITaxonomy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTaxonomy with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTaxonomyRequest() - ); - request.taxonomy ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTaxonomyRequest', - ['taxonomy', 'name'] - ); - request.taxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `taxonomy.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTaxonomy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateTaxonomy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTaxonomy with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdateTaxonomyRequest() - ); - request.taxonomy ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdateTaxonomyRequest', - ['taxonomy', 'name'] - ); - request.taxonomy.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateTaxonomy(request), expectedError); - }); - }); - - describe('getTaxonomy', () => { - it('invokes getTaxonomy without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ); - client.innerApiCalls.getTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.getTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTaxonomy without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ); - client.innerApiCalls.getTaxonomy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTaxonomy( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITaxonomy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTaxonomy with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTaxonomy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getTaxonomy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTaxonomy with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getTaxonomy(request), expectedError); - }); - }); - - describe('createPolicyTag', () => { - it('invokes createPolicyTag without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreatePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreatePolicyTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ); - client.innerApiCalls.createPolicyTag = stubSimpleCall(expectedResponse); - const [response] = await client.createPolicyTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPolicyTag without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreatePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreatePolicyTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ); - client.innerApiCalls.createPolicyTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createPolicyTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IPolicyTag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPolicyTag with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreatePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreatePolicyTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createPolicyTag = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createPolicyTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPolicyTag with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.CreatePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.CreatePolicyTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createPolicyTag(request), expectedError); - }); - }); - - describe('deletePolicyTag', () => { - it('invokes deletePolicyTag without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeletePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeletePolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deletePolicyTag = stubSimpleCall(expectedResponse); - const [response] = await client.deletePolicyTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePolicyTag without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeletePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeletePolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deletePolicyTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deletePolicyTag( - 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.deletePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePolicyTag with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeletePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeletePolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePolicyTag = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deletePolicyTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePolicyTag with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.DeletePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.DeletePolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deletePolicyTag(request), expectedError); - }); - }); - - describe('updatePolicyTag', () => { - it('invokes updatePolicyTag without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdatePolicyTagRequest() - ); - request.policyTag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdatePolicyTagRequest', - ['policyTag', 'name'] - ); - request.policyTag.name = defaultValue1; - const expectedHeaderRequestParams = `policy_tag.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ); - client.innerApiCalls.updatePolicyTag = stubSimpleCall(expectedResponse); - const [response] = await client.updatePolicyTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updatePolicyTag without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdatePolicyTagRequest() - ); - request.policyTag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdatePolicyTagRequest', - ['policyTag', 'name'] - ); - request.policyTag.name = defaultValue1; - const expectedHeaderRequestParams = `policy_tag.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ); - client.innerApiCalls.updatePolicyTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updatePolicyTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IPolicyTag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updatePolicyTag with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdatePolicyTagRequest() - ); - request.policyTag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdatePolicyTagRequest', - ['policyTag', 'name'] - ); - request.policyTag.name = defaultValue1; - const expectedHeaderRequestParams = `policy_tag.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updatePolicyTag = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updatePolicyTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updatePolicyTag with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.UpdatePolicyTagRequest() - ); - request.policyTag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.UpdatePolicyTagRequest', - ['policyTag', 'name'] - ); - request.policyTag.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updatePolicyTag(request), expectedError); - }); - }); - - describe('getPolicyTag', () => { - it('invokes getPolicyTag without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetPolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetPolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ); - client.innerApiCalls.getPolicyTag = stubSimpleCall(expectedResponse); - const [response] = await client.getPolicyTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPolicyTag without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetPolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetPolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ); - client.innerApiCalls.getPolicyTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPolicyTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IPolicyTag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPolicyTag with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetPolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetPolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPolicyTag = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getPolicyTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPolicyTag with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.GetPolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.GetPolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getPolicyTag(request), expectedError); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getIamPolicy(request), expectedError); - }); - }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.setIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setIamPolicy(request), expectedError); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.ITestIamPermissionsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.testIamPermissions(request), expectedError); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with closed client', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.testIamPermissions(request), expectedError); - }); - }); - - describe('listTaxonomies', () => { - it('invokes listTaxonomies without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - ]; - client.innerApiCalls.listTaxonomies = stubSimpleCall(expectedResponse); - const [response] = await client.listTaxonomies(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTaxonomies without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - ]; - client.innerApiCalls.listTaxonomies = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTaxonomies( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.ITaxonomy[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTaxonomies with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTaxonomies = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listTaxonomies(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTaxonomiesStream without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - ]; - client.descriptors.page.listTaxonomies.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listTaxonomiesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Taxonomy[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Taxonomy) => { - 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.listTaxonomies.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTaxonomies, request) - ); - assert( - (client.descriptors.page.listTaxonomies.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listTaxonomiesStream with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTaxonomies.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listTaxonomiesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.Taxonomy[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.Taxonomy) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listTaxonomies.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTaxonomies, request) - ); - assert( - (client.descriptors.page.listTaxonomies.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTaxonomies without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.Taxonomy() - ), - ]; - client.descriptors.page.listTaxonomies.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.ITaxonomy[] = []; - const iterable = client.listTaxonomiesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listTaxonomies.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listTaxonomies.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTaxonomies with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTaxonomies.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listTaxonomiesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.ITaxonomy[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listTaxonomies.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listTaxonomies.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listPolicyTags', () => { - it('invokes listPolicyTags without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - ]; - client.innerApiCalls.listPolicyTags = stubSimpleCall(expectedResponse); - const [response] = await client.listPolicyTags(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPolicyTags without error using callback', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - ]; - client.innerApiCalls.listPolicyTags = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listPolicyTags( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1.IPolicyTag[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPolicyTags with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listPolicyTags = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listPolicyTags(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPolicyTagsStream without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - ]; - client.descriptors.page.listPolicyTags.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listPolicyTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.PolicyTag[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.PolicyTag) => { - 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.listPolicyTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listPolicyTags, request) - ); - assert( - (client.descriptors.page.listPolicyTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listPolicyTagsStream with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPolicyTags.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listPolicyTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1.PolicyTag[] = []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1.PolicyTag) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listPolicyTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listPolicyTags, request) - ); - assert( - (client.descriptors.page.listPolicyTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPolicyTags without error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1.PolicyTag() - ), - ]; - client.descriptors.page.listPolicyTags.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1.IPolicyTag[] = []; - const iterable = client.listPolicyTagsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listPolicyTags.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listPolicyTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPolicyTags with error', async () => { - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPolicyTags.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPolicyTagsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1.IPolicyTag[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listPolicyTags.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listPolicyTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - describe('entry', () => { - const fakePath = '/rendered/path/entry'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - }; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryPath', () => { - const result = client.entryPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryName', () => { - const result = client.matchProjectFromEntryName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryName', () => { - const result = client.matchLocationFromEntryName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryName', () => { - const result = client.matchEntryGroupFromEntryName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromEntryName', () => { - const result = client.matchEntryFromEntryName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('entryGroup', () => { - const fakePath = '/rendered/path/entryGroup'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - }; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryGroupPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryGroupPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryGroupPath', () => { - const result = client.entryGroupPath( - 'projectValue', - 'locationValue', - 'entryGroupValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryGroupPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryGroupName', () => { - const result = client.matchProjectFromEntryGroupName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryGroupName', () => { - const result = client.matchLocationFromEntryGroupName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryGroupName', () => { - const result = client.matchEntryGroupFromEntryGroupName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('location', () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('policyTag', () => { - const fakePath = '/rendered/path/policyTag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - policy_tag: 'policyTagValue', - }; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.policyTagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.policyTagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('policyTagPath', () => { - const result = client.policyTagPath( - 'projectValue', - 'locationValue', - 'taxonomyValue', - 'policyTagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.policyTagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromPolicyTagName', () => { - const result = client.matchProjectFromPolicyTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromPolicyTagName', () => { - const result = client.matchLocationFromPolicyTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromPolicyTagName', () => { - const result = client.matchTaxonomyFromPolicyTagName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchPolicyTagFromPolicyTagName', () => { - const result = client.matchPolicyTagFromPolicyTagName(fakePath); - assert.strictEqual(result, 'policyTagValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('project', () => { - const fakePath = '/rendered/path/project'; - const expectedParameters = { - project: 'projectValue', - }; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath('projectValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tag', () => { - const fakePath = '/rendered/path/tag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - tag: 'tagValue', - }; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagPath', () => { - const result = client.tagPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue', - 'tagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagName', () => { - const result = client.matchProjectFromTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagName', () => { - const result = client.matchLocationFromTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromTagName', () => { - const result = client.matchEntryGroupFromTagName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromTagName', () => { - const result = client.matchEntryFromTagName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagFromTagName', () => { - const result = client.matchTagFromTagName(fakePath); - assert.strictEqual(result, 'tagValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplate', () => { - const fakePath = '/rendered/path/tagTemplate'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - }; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplatePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplatePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplatePath', () => { - const result = client.tagTemplatePath( - 'projectValue', - 'locationValue', - 'tagTemplateValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagTemplatePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateName', () => { - const result = client.matchProjectFromTagTemplateName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateName', () => { - const result = client.matchLocationFromTagTemplateName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateName', () => { - const result = client.matchTagTemplateFromTagTemplateName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplateField', () => { - const fakePath = '/rendered/path/tagTemplateField'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - field: 'fieldValue', - }; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplateFieldPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplateFieldPath', () => { - const result = client.tagTemplateFieldPath( - 'projectValue', - 'locationValue', - 'tagTemplateValue', - 'fieldValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.tagTemplateFieldPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateFieldName', () => { - const result = client.matchProjectFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateFieldName', () => { - const result = client.matchLocationFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateFieldName', () => { - const result = - client.matchTagTemplateFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchFieldFromTagTemplateFieldName', () => { - const result = client.matchFieldFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'fieldValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('taxonomy', () => { - const fakePath = '/rendered/path/taxonomy'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - }; - const client = new policytagmanagerModule.v1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taxonomyPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.taxonomyPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('taxonomyPath', () => { - const result = client.taxonomyPath( - 'projectValue', - 'locationValue', - 'taxonomyValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.taxonomyPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTaxonomyName', () => { - const result = client.matchProjectFromTaxonomyName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTaxonomyName', () => { - const result = client.matchLocationFromTaxonomyName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromTaxonomyName', () => { - const result = client.matchTaxonomyFromTaxonomyName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - }); -}); diff --git a/test/gapic_policy_tag_manager_v1beta1.ts b/test/gapic_policy_tag_manager_v1beta1.ts deleted file mode 100644 index 390edfd3..00000000 --- a/test/gapic_policy_tag_manager_v1beta1.ts +++ /dev/null @@ -1,2927 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** 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 policytagmanagerModule 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.PolicyTagManagerClient', () => { - describe('Common methods', () => { - it('has servicePath', () => { - const servicePath = - policytagmanagerModule.v1beta1.PolicyTagManagerClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - policytagmanagerModule.v1beta1.PolicyTagManagerClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = policytagmanagerModule.v1beta1.PolicyTagManagerClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = - new policytagmanagerModule.v1beta1.PolicyTagManagerClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.policyTagManagerStub, undefined); - await client.initialize(); - assert(client.policyTagManagerStub); - }); - - it('has close method for the initialized client', done => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.policyTagManagerStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.policyTagManagerStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - 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 policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - 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('createTaxonomy', () => { - it('invokes createTaxonomy without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ); - client.innerApiCalls.createTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.createTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTaxonomy without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ); - client.innerApiCalls.createTaxonomy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createTaxonomy( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITaxonomy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTaxonomy with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTaxonomy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createTaxonomy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createTaxonomy with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createTaxonomy(request), expectedError); - }); - }); - - describe('deleteTaxonomy', () => { - it('invokes deleteTaxonomy without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.deleteTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTaxonomy without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteTaxonomy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteTaxonomy( - 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.deleteTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTaxonomy with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTaxonomy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteTaxonomy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteTaxonomy with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteTaxonomy(request), expectedError); - }); - }); - - describe('updateTaxonomy', () => { - it('invokes updateTaxonomy without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest() - ); - request.taxonomy ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest', - ['taxonomy', 'name'] - ); - request.taxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `taxonomy.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ); - client.innerApiCalls.updateTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.updateTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTaxonomy without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest() - ); - request.taxonomy ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest', - ['taxonomy', 'name'] - ); - request.taxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `taxonomy.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ); - client.innerApiCalls.updateTaxonomy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateTaxonomy( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITaxonomy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTaxonomy with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest() - ); - request.taxonomy ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest', - ['taxonomy', 'name'] - ); - request.taxonomy.name = defaultValue1; - const expectedHeaderRequestParams = `taxonomy.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTaxonomy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updateTaxonomy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateTaxonomy with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest() - ); - request.taxonomy ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest', - ['taxonomy', 'name'] - ); - request.taxonomy.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateTaxonomy(request), expectedError); - }); - }); - - describe('getTaxonomy', () => { - it('invokes getTaxonomy without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ); - client.innerApiCalls.getTaxonomy = stubSimpleCall(expectedResponse); - const [response] = await client.getTaxonomy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTaxonomy without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ); - client.innerApiCalls.getTaxonomy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getTaxonomy( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITaxonomy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTaxonomy with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getTaxonomy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getTaxonomy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getTaxonomy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getTaxonomy with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getTaxonomy(request), expectedError); - }); - }); - - describe('createPolicyTag', () => { - it('invokes createPolicyTag without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ); - client.innerApiCalls.createPolicyTag = stubSimpleCall(expectedResponse); - const [response] = await client.createPolicyTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPolicyTag without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ); - client.innerApiCalls.createPolicyTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createPolicyTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IPolicyTag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPolicyTag with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createPolicyTag = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.createPolicyTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createPolicyTag with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createPolicyTag(request), expectedError); - }); - }); - - describe('deletePolicyTag', () => { - it('invokes deletePolicyTag without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deletePolicyTag = stubSimpleCall(expectedResponse); - const [response] = await client.deletePolicyTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePolicyTag without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deletePolicyTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deletePolicyTag( - 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.deletePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePolicyTag with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deletePolicyTag = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.deletePolicyTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deletePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deletePolicyTag with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deletePolicyTag(request), expectedError); - }); - }); - - describe('updatePolicyTag', () => { - it('invokes updatePolicyTag without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest() - ); - request.policyTag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest', - ['policyTag', 'name'] - ); - request.policyTag.name = defaultValue1; - const expectedHeaderRequestParams = `policy_tag.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ); - client.innerApiCalls.updatePolicyTag = stubSimpleCall(expectedResponse); - const [response] = await client.updatePolicyTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updatePolicyTag without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest() - ); - request.policyTag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest', - ['policyTag', 'name'] - ); - request.policyTag.name = defaultValue1; - const expectedHeaderRequestParams = `policy_tag.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ); - client.innerApiCalls.updatePolicyTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updatePolicyTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IPolicyTag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updatePolicyTag with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest() - ); - request.policyTag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest', - ['policyTag', 'name'] - ); - request.policyTag.name = defaultValue1; - const expectedHeaderRequestParams = `policy_tag.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updatePolicyTag = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.updatePolicyTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updatePolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updatePolicyTag with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest() - ); - request.policyTag ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest', - ['policyTag', 'name'] - ); - request.policyTag.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updatePolicyTag(request), expectedError); - }); - }); - - describe('getPolicyTag', () => { - it('invokes getPolicyTag without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ); - client.innerApiCalls.getPolicyTag = stubSimpleCall(expectedResponse); - const [response] = await client.getPolicyTag(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPolicyTag without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ); - client.innerApiCalls.getPolicyTag = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPolicyTag( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IPolicyTag | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPolicyTag with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPolicyTag = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getPolicyTag(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getPolicyTag as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPolicyTag with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getPolicyTag(request), expectedError); - }); - }); - - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.getIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.getIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getIamPolicy with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.GetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.GetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getIamPolicy(request), expectedError); - }); - }); - - describe('setIamPolicy', () => { - it('invokes setIamPolicy without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); - const [response] = await client.setIamPolicy(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.Policy() - ); - client.innerApiCalls.setIamPolicy = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setIamPolicy( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.IPolicy | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setIamPolicy = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.setIamPolicy(request), expectedError); - const actualRequest = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.setIamPolicy as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setIamPolicy with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.SetIamPolicyRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.SetIamPolicyRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.setIamPolicy(request), expectedError); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - ( - err?: Error | null, - result?: protos.google.iam.v1.ITestIamPermissionsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.testIamPermissions(request), expectedError); - const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with closed client', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] - ); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.testIamPermissions(request), expectedError); - }); - }); - - describe('listTaxonomies', () => { - it('invokes listTaxonomies without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - ]; - client.innerApiCalls.listTaxonomies = stubSimpleCall(expectedResponse); - const [response] = await client.listTaxonomies(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTaxonomies without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - ]; - client.innerApiCalls.listTaxonomies = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listTaxonomies( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.ITaxonomy[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTaxonomies with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listTaxonomies = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listTaxonomies(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listTaxonomies as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listTaxonomiesStream without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - ]; - client.descriptors.page.listTaxonomies.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listTaxonomiesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.Taxonomy[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.Taxonomy) => { - 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.listTaxonomies.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTaxonomies, request) - ); - assert( - (client.descriptors.page.listTaxonomies.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listTaxonomiesStream with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTaxonomies.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listTaxonomiesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.Taxonomy[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.Taxonomy) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listTaxonomies.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTaxonomies, request) - ); - assert( - (client.descriptors.page.listTaxonomies.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTaxonomies without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.Taxonomy() - ), - ]; - client.descriptors.page.listTaxonomies.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1beta1.ITaxonomy[] = []; - const iterable = client.listTaxonomiesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listTaxonomies.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listTaxonomies.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listTaxonomies with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listTaxonomies.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listTaxonomiesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1beta1.ITaxonomy[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listTaxonomies.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listTaxonomies.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listPolicyTags', () => { - it('invokes listPolicyTags without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - ]; - client.innerApiCalls.listPolicyTags = stubSimpleCall(expectedResponse); - const [response] = await client.listPolicyTags(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPolicyTags without error using callback', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - ]; - client.innerApiCalls.listPolicyTags = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listPolicyTags( - request, - ( - err?: Error | null, - result?: protos.google.cloud.datacatalog.v1beta1.IPolicyTag[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPolicyTags with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listPolicyTags = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listPolicyTags(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listPolicyTags as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listPolicyTagsStream without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - ]; - client.descriptors.page.listPolicyTags.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listPolicyTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.PolicyTag[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.PolicyTag) => { - 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.listPolicyTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listPolicyTags, request) - ); - assert( - (client.descriptors.page.listPolicyTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listPolicyTagsStream with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPolicyTags.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listPolicyTagsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.datacatalog.v1beta1.PolicyTag[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.datacatalog.v1beta1.PolicyTag) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listPolicyTags.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listPolicyTags, request) - ); - assert( - (client.descriptors.page.listPolicyTags.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPolicyTags without error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.PolicyTag() - ), - ]; - client.descriptors.page.listPolicyTags.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.datacatalog.v1beta1.IPolicyTag[] = - []; - const iterable = client.listPolicyTagsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listPolicyTags.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listPolicyTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listPolicyTags with error', async () => { - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listPolicyTags.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPolicyTagsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.datacatalog.v1beta1.IPolicyTag[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listPolicyTags.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listPolicyTags.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - describe('entry', () => { - const fakePath = '/rendered/path/entry'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - }; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryPath', () => { - const result = client.entryPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryName', () => { - const result = client.matchProjectFromEntryName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryName', () => { - const result = client.matchLocationFromEntryName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryName', () => { - const result = client.matchEntryGroupFromEntryName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromEntryName', () => { - const result = client.matchEntryFromEntryName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.entryPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('entryGroup', () => { - const fakePath = '/rendered/path/entryGroup'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - }; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.entryGroupPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.entryGroupPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('entryGroupPath', () => { - const result = client.entryGroupPath( - 'projectValue', - 'locationValue', - 'entryGroupValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.entryGroupPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEntryGroupName', () => { - const result = client.matchProjectFromEntryGroupName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEntryGroupName', () => { - const result = client.matchLocationFromEntryGroupName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromEntryGroupName', () => { - const result = client.matchEntryGroupFromEntryGroupName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.entryGroupPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('location', () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('policyTag', () => { - const fakePath = '/rendered/path/policyTag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - policy_tag: 'policyTagValue', - }; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.policyTagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.policyTagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('policyTagPath', () => { - const result = client.policyTagPath( - 'projectValue', - 'locationValue', - 'taxonomyValue', - 'policyTagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.policyTagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromPolicyTagName', () => { - const result = client.matchProjectFromPolicyTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromPolicyTagName', () => { - const result = client.matchLocationFromPolicyTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromPolicyTagName', () => { - const result = client.matchTaxonomyFromPolicyTagName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchPolicyTagFromPolicyTagName', () => { - const result = client.matchPolicyTagFromPolicyTagName(fakePath); - assert.strictEqual(result, 'policyTagValue'); - assert( - (client.pathTemplates.policyTagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('project', () => { - const fakePath = '/rendered/path/project'; - const expectedParameters = { - project: 'projectValue', - }; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.projectPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath('projectValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tag', () => { - const fakePath = '/rendered/path/tag'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - entry_group: 'entryGroupValue', - entry: 'entryValue', - tag: 'tagValue', - }; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagPath', () => { - const result = client.tagPath( - 'projectValue', - 'locationValue', - 'entryGroupValue', - 'entryValue', - 'tagValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagName', () => { - const result = client.matchProjectFromTagName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagName', () => { - const result = client.matchLocationFromTagName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryGroupFromTagName', () => { - const result = client.matchEntryGroupFromTagName(fakePath); - assert.strictEqual(result, 'entryGroupValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEntryFromTagName', () => { - const result = client.matchEntryFromTagName(fakePath); - assert.strictEqual(result, 'entryValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagFromTagName', () => { - const result = client.matchTagFromTagName(fakePath); - assert.strictEqual(result, 'tagValue'); - assert( - (client.pathTemplates.tagPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplate', () => { - const fakePath = '/rendered/path/tagTemplate'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - }; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplatePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplatePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplatePath', () => { - const result = client.tagTemplatePath( - 'projectValue', - 'locationValue', - 'tagTemplateValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.tagTemplatePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateName', () => { - const result = client.matchProjectFromTagTemplateName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateName', () => { - const result = client.matchLocationFromTagTemplateName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateName', () => { - const result = client.matchTagTemplateFromTagTemplateName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplatePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('tagTemplateField', () => { - const fakePath = '/rendered/path/tagTemplateField'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - tag_template: 'tagTemplateValue', - field: 'fieldValue', - }; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.tagTemplateFieldPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.tagTemplateFieldPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('tagTemplateFieldPath', () => { - const result = client.tagTemplateFieldPath( - 'projectValue', - 'locationValue', - 'tagTemplateValue', - 'fieldValue' - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.tagTemplateFieldPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTagTemplateFieldName', () => { - const result = client.matchProjectFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTagTemplateFieldName', () => { - const result = client.matchLocationFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTagTemplateFromTagTemplateFieldName', () => { - const result = - client.matchTagTemplateFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'tagTemplateValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchFieldFromTagTemplateFieldName', () => { - const result = client.matchFieldFromTagTemplateFieldName(fakePath); - assert.strictEqual(result, 'fieldValue'); - assert( - (client.pathTemplates.tagTemplateFieldPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - - describe('taxonomy', () => { - const fakePath = '/rendered/path/taxonomy'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - taxonomy: 'taxonomyValue', - }; - const client = new policytagmanagerModule.v1beta1.PolicyTagManagerClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.taxonomyPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.taxonomyPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('taxonomyPath', () => { - const result = client.taxonomyPath( - 'projectValue', - 'locationValue', - 'taxonomyValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.taxonomyPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromTaxonomyName', () => { - const result = client.matchProjectFromTaxonomyName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromTaxonomyName', () => { - const result = client.matchLocationFromTaxonomyName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTaxonomyFromTaxonomyName', () => { - const result = client.matchTaxonomyFromTaxonomyName(fakePath); - assert.strictEqual(result, 'taxonomyValue'); - assert( - (client.pathTemplates.taxonomyPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - }); -}); diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index c78f1c88..00000000 --- a/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/webpack.config.js b/webpack.config.js deleted file mode 100644 index 01fbc2f3..00000000 --- a/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: 'DataCatalog', - filename: './data-catalog.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', -};